Results 1 to 4 of 4
Hello,
I am trying to host a website but I seem to be having a ton of problems with permissions. I have a second user, in the root usergroup, that ...
- 12-24-2009 #1Just Joined!
- Join Date
- Nov 2009
- Posts
- 14
/var/www/ Permissions problems
Hello,
I am trying to host a website but I seem to be having a ton of problems with permissions. I have a second user, in the root usergroup, that has control of the /var/www/ directory for where my sites are hosted (I have a few virtual sites that are hosted inside of the www directory). The problem that I have is when my php script tries to create a folder, it creates the folder under the www-data username and usergroup, apache's default username/group I assume.
The problem with this is when my php script tries to create a directory/move a file, it is issuing me gobs of errors stating it doesn't have correct permissions. For example, when I run the mkdir( 'myfolder', 0777); command in a php script, it will only make a folder with the max permissions of 0755.
What would you recommend to fix this problem?
Thanks in advance,
noop
- 12-24-2009 #2Just Joined!
- Join Date
- Dec 2009
- Posts
- 9
just add below in your php scrip:
mkdir("myfolder",0777);
chmod("myfolder",0777);
it can change your permission to rwxrwxrwx
- 12-24-2009 #3Just Joined!
- Join Date
- Nov 2009
- Posts
- 14
The folder still remains at 755
- 12-25-2009 #4Just Joined!
- Join Date
- Dec 2009
- Posts
- 9


Reply With Quote

