cancel
Showing results for 
Search instead for 
Did you mean: 

New CGI: permissions don't seem to be right in the FAQs

N/A

New CGI: permissions don't seem to be right in the FAQs

about the permissions part of the FAQs.....
Quote
17. What are the base permissions and common permissions?
User's home directories: will be chmod 750 by default, owned by the user, group owned by nogroup.

Directories (plus files and subdirectories): within the user's home directory will be owned by the user and group owned by the group cgiusers.

Plain files (including php files): will be chmod 740 by default.

The minimum chmod values needed for things to work are (read only):


Directories: 550

Plain files (e.g. html): 440

Scripts (inc php): 450


The most common settings you will tend to use will be: chmod 750 for everything, (or 755). Note that the system does not require 'other' permissions to be set (which is the third number on a plain old chmod). We strongly advise against setting 'other' permissions wherever possible, as doing so may weaken your data
security.


1) my files are defaulted to 640 when they are FTPed

2) minimum settings for PHP files is 500 as whatever runs to get the files runs under your user name. 450 DOES NOT WORK. Why do we need to set permissions for the user group? This weakens the security allowing read access to the php scripts.

3) plain files (.html, images) need 040 minumum, though they cannot be read/manipulated by your scripts if the user permission is 0. Also you will not have permission to do anything to do anything to it through FTP/shell.


An example (only front page works for now due to other setup factors):

http://ccgi.jarvis.force9.co.uk/djarv/

All files are chmod 040 except php files which are 500. Image directory is 550.


I have been testing the above and if I'm wrong then there is something very weird going on with my new CGI space. However if I'm right then i it doesn't inspire much confidence in the new platform / the people that are telling us how to use it.

Jarv
1 REPLY
mar7t1n
Grafter
Posts: 84
Registered: 09-08-2007

Permission Error

I had the same problem. My PHP files all had 640 when I FTP'd them to the server. They have to be excutable by you only so setting all PHP files to 700 means that they work and nobody else can touch them.

I'm sure F9 will correct this fault. Or be able to tell us how to configure our own space to solve the problem when the new server gets bedded in.