cancel
Showing results for 
Search instead for 
Did you mean: 

CGI space and file permissions

digital
Grafter
Posts: 94
Registered: ‎11-04-2007

CGI space and file permissions

I have a form in my CGI space that uses a couple of .php files and half a dozen .htm files in the root, and a couple of images in a folder.
I have set all the permissions to 750. Is this correct?
TIA.
4 REPLIES 4
Mattz0r
Rising Star
Posts: 620
Fixes: 1
Registered: ‎21-07-2010

Re: CGI space and file permissions

Hey Tia,
You may find this link useful: http://community.plus.net/library/settings/cgi-platform-php-upgrade-faq/
It's the FAQ for when the CGI/PHP platform was upgraded.
Regards,
Matt
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: CGI space and file permissions

HTML and image files should have permissions 0640, PHP files should be 0700, folders should generally be 0710, but the folder containing images needs to be 0750 so that the server can locate the images.
David
oliverb
Grafter
Posts: 606
Registered: ‎02-08-2007

Re: CGI space and file permissions

Oops, SOLVED!!!
solved by: http://community.plus.net/forum/index.php/topic,84349.0.html
I know this may seem like a silly question, but how can I set the attributes for all files of a given type in a folder tree e.g. setting all php files to executable?
I've tried to use chmod via a script and I can set all in one folder but whatever I try it just won't recurse.
odd, as I bet rm -r would happily delete everything
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: CGI space and file permissions

Running chmod recursively should also happily change *everything*, directories and files that match any pattern you specify, but that is probably not what you want.
Doesn't Gabe's script (in the post you linked to) do what you specified? You can adapt that to process different file types if needed.
David