View Full Version : PHP Safe Mode & Directory Permissions
domino
23rd August 2005, 15:27
I have 2 questions.
1. Why did it automatically set Safe mode ON, on all my Virtual Servers?
2. Why are the directories default CHMOD 775 and files CHMOD 664?
I'm a bit paranoid about the chmod values. How can I change to CHMOD 755 for folders and CHMOD 644 for files when I create a new Virtual Servers?
falko
23rd August 2005, 15:48
Why did it automatically set Safe mode ON, on all my Virtual Servers?
Do you mean that the PHP Safe Mode checkbox is already checked when you create a new web site? Then I guess you've defined a hosting template that has Safe Mode on.
Otherwise I think you have Safe Mode on in your php.ini.
Why are the directories default CHMOD 775 and files CHMOD 664?
That's because under Sendmail procmail recipes aren't executed if the parent directories don't have 775. I think it's different with Postfix, but I'm not 100% sure, so I wouldn't try to change the permissions as your mail delivery might fail afterwards.
domino
23rd August 2005, 15:55
Do you mean that the PHP Safe Mode checkbox is already checked when you create a new web site?
Yea, thats why. I wasn't paying attention with checking the 3 domain's feature boxes. This is a new box Debian box this time :). Thanks for reminding me that I need thicker glasses.
That's because under Sendmail procmail recipes aren't executed if the parent directories don't have 775. I think it's different with Postfix, but I'm not 100% sure, so I wouldn't try to change the permissions as your mail delivery might fail afterwards.
I'm using postfix and isn't it a secuiry risk to have the "web" folder with that type of permission? I'm not claiming it is. It's just I'm used to having folder at 755 and files at 644.
till
23rd August 2005, 16:58
I'm using postfix and isn't it a secuiry risk to have the "web" folder with that type of permission? I'm not claiming it is. It's just I'm used to having folder at 755 and files at 644.
Every web has ist own group and the folder is owned by that group.
domino
23rd August 2005, 18:53
If no one else objects I'll take your word for it :). It's just that a certain Gallery script will not let me continue the installation unless the "web" permissions are set to 755. :(. So dump the script?
falko
23rd August 2005, 19:48
If no one else objects I'll take your word for it :). It's just that a certain Gallery script will not let me continue the installation unless the "web" permissions are set to 755. :(. So dump the script?
You can chmod the web folder to 755. :)
domino
24th August 2005, 04:44
You can chmod the web folder to 755.
I will do that. Is chmod 775 / 664 a requirement for postfix? If no, where can I set the perams for changing it? I want to make it a default 755 folders / 644 files whenever I create an new site in ISPC and upload/create things through FTP client. Is that possible given the current environment and applications installed?
falko
25th August 2005, 11:17
I will do that. Is chmod 775 / 664 a requirement for postfix? If no, where can I set the perams for changing it? I want to make it a default 755 folders / 644 files whenever I create an new site in ISPC and upload/create things through FTP client. Is that possible given the current environment and applications installed?
You can change the function make docroot() in /root/ispconfig/scripts/lib/config.lib.php. There all chmods are done. :)
domino
25th August 2005, 11:28
Thank you for the pointing it out. I have my peice of mind now that my idiot friends and brother can install whatever they like :).
PS. Oh I sure wished quick reply was enabled on this board :D
hairydog2
19th December 2005, 17:18
Thank you for the pointing it out. I have my peice of mind now that my idiot friends and brother can install whatever they like :).
PS. Oh I sure wished quick reply was enabled on this board :D
It is! Click the button to the right of the Quote button
falko
19th December 2005, 19:38
It is! Click the button to the right of the Quote button
It wasn't enabled when domino posted that. It has been enabled in the meantime. ;)
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.