Forums / Templates, Stylesheets, Page Layout / What permissions for all files and directories?

What permissions for all files and directories?

Locked

Views: 1,458

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
24 Nov 2008, 1:20 AM
#1
anony avatar

anony

New Zenner

Join Date:
Nov 2008
Posts:
3
Plugin Contributions:
0

What permissions for all files and directories?

(posting this anonymously to protect my site)

:oops: Don't ask me how I did it, but I accidentally set the permission of every Zencart file and directory to 777. I think Fantastico is to blame, because it 'Prepared Zencart for removal' when I didn't want it to.

Anyway, to fix it I recursively chmod'd all files and directories to 755, with the exception of configure.php which is now 444.

Is this secure? or should I set some folders / files to something else?

24 Nov 2008, 1:25 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: What permissions for all files and directories?

If you were to change all directories/subdirectories to 755 and all files to 644 ... then you could go back and make the few changes that you might need for your image directories to 777 and files to 755 and the other directories that might need adjusting such as the cache directory and the like ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

24 Nov 2008, 1:29 AM
#3
anony avatar

anony

New Zenner

Join Date:
Nov 2008
Posts:
3
Plugin Contributions:
0

Re: What permissions for all files and directories?

Thanks for such a quick reply Linda, I'll take your advice... just wondering how I recursively chmod just the files and not directories...

24 Nov 2008, 1:37 AM
#4
anony avatar

anony

New Zenner

Join Date:
Nov 2008
Posts:
3
Plugin Contributions:
0

Re: What permissions for all files and directories?

actually here's the commands:

chmod -R 644 * (to set everything to 644)

then

find . -type d -print0 | xargs -0 chmod 755 (sets directories to 755)

then set images / cache / configure.php like you said.

Thanks again, I can stop worrying now.