views:

36

answers:

1

hi,

Drupal cannot create the "files" folder. I tried to upload a php script with 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.

+1  A: 

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.

Henrik Opel
exactly, so I don't have access to PHP permissions, and I have set it to 777. They told me it is still safe if I apply 777 only to files folder.
Patrick

related questions