开发者

Drupal is unable to create the "files" folder (and any upload php script as well)

开发者 https://www.devze.com 2022-12-23 13:34 出处:网络
Drupal cannot create the \"files\" folder. I tried to upload a php script with开发者_StackOverflow mkdir(\"files\",774) but I get a permissions error, so basically any php script is not able to create

Drupal cannot create the "files" folder. I tried to upload a php script with开发者_StackOverflow mkdir("files",774) but I get a permissions error, so basically any php script is not able to create a folder on the server...

What do you suggest ? If I create the folder manually from ftp client and I assign 777 permission everything works perfectly, but it is not safe solution.


You can create it manually and assign 775, as that would be how Drupal would set it (except if you use private downloads). As a quick fix, this should be OK, but if your server disallows directory creation from PHP in general, you'll face trouble down the road, as many modules will want to create their own directory structures within the files folder.

So I'd recommend solving the root cause, ensuring that PHP executed from within the webserver context can do file/directory operations within the document root.

0

精彩评论

暂无评论...
验证码 换一张
取 消