don't chmod 0666 [message #7910] |
Tue, 24 December 2002 16:37 |
petej
Messages: 2 Registered: December 2002
Karma: 0
|
Junior Member |
|
|
I use FUDforum under a CGIWrap that runs PHP scripts under the UID of the owner of the file, rather than under the UID of the webserver, and CGIwrap won't run a file if it is group writable, so in the places where files are unlocked, the permissions have to be set to 0644, not 0666, and directories need to be 0755, not 0777. It would be good if FUD would pick up these values from GLOBALS, rather than having them fixed in the code, and then, on installation, a check could be made to set the appropriate value in GLOBALS ("Do you run under CGIWrap?" If yes, then set $GLOBALS['UNLOCKED_FILE_PERMS'] to 0644, otherwise set it to 0666, and set $GLOBALS['UNLOCKED_DIR_PERMS'] to 0755, otherwise set it to 0755.
This would make my life easier on the next upgrade, because I'm sure I'm going to forget to change all the 0666 to 0644 and then I'll watch my forums come to a halt until I remember what I had to do.
Thanks,
Pete.
|
|
|
Re: don't chmod 0666 [message #7973 is a reply to message #7910] |
Fri, 03 January 2003 16:36 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Use the 'lock' feature the set more secure file permissions. The 'unlocked' state is only needed during upgrade process or when you want to modify the forum's files manually.
FUDforum Core Developer
|
|
|
Re: don't chmod 0666 [message #7974 is a reply to message #7973] |
Fri, 03 January 2003 16:41 |
Anonymous
|
|
|
|
I'm sorry I wasn't more clear. I wanted to point out that the implementation of the unlock feature breaks my forum, because it sets files to be group and world readable, and CGIWrap refuses to execute a file that is world-writable (my website is using CGIWrap for PHP so that individual PHP users run under their own UIDs).
I wanted to ask if the liberal sprinkling of "0666" and "0600" through the code can be replaced with a Global.
|
|
|
Re: don't chmod 0666 [message #7994 is a reply to message #7974] |
Sun, 05 January 2003 23:45 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
What do you mean global?
When the forum is locked all files have 0600 permissions and directories have 0711 permission. When the forum is unlocked the files are 0666 and directories are 0777.
FUDforum Core Developer
|
|
|