Page 1 of 1

php unable to create folders

Posted: Mon Mar 22, 2010 6:05 am
by aneuryzma
hi,

I'm using Drupal and it seems that it 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 on the server is not able to create a folder on the server... I guess this is the problem.

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.

thanks

Re: php unable to create folders

Posted: Mon Mar 22, 2010 7:36 am
by M2tM
People say setting things to 777 is not a safe solution, but that said, it just indicates which users can modify things. The person still has to get access to your server or be able to run an arbitrary script in order to actually do anything in the first place, so generally it isn't actually "unsafe" in most situations.

Re: php unable to create folders

Posted: Mon Mar 22, 2010 7:48 am
by aneuryzma
ok cool, thanks