1
trevor
CHMOD Recommendations
  • 2004/1/30 0:54

  • trevor

  • Just popping in

  • Posts: 7

  • Since: 2003/10/21


After working through the installation of quite a few modules now I am interested in what access settings are recommended in general. My host are suggesting that prolific use of 777 is not good practice and I'm sure it's not either.

What settings are recommnded - in general and for cache (where it exists)?


2
Dave_L
Re: CHMOD Recommendations
  • 2004/1/30 3:18

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Directories that the script needs to be able to modify (create/delete/rename files within the directory) require 777, and files that the script needs to be able to modify require 666.

Directories that the script doesn't need to modify can be 755, and files that the script doesn't need to modify can be 644.

That's if the script runs as a user other than the user who owns the files, which is typically the case.

If the script (i.e., the web server) runs as the same user who owns the files, or if the server uses PHP Suexec, then the permissions can be tightened to 700 and 600.

The above applies to Unix servers, not Windows.

Does that answer your question?

3
Sebastian
Re: CHMOD Recommendations
  • 2005/1/6 3:14

  • Sebastian

  • Just popping in

  • Posts: 23

  • Since: 2004/11/25


And why not use 766 for the uploads directory, wouldn't that be safe and useful? ...since I can't think of an activity other that reading and writing to this dir, why the need for execute permission? (I'm a n00b though, so it may just be my lack of imagination ;))

(there was a thread realting to uploads directory settings somewhere here, but I can't seem to find it so I posted here :) )

EDIT: OK, so I just found out this doesn't work well with a PHP on Apache, it can't read uploads then, only I can't figure out why it doesn't

4
sudhaker
Re: CHMOD Recommendations
  • 2005/1/6 4:06

  • sudhaker

  • Not too shy to talk

  • Posts: 117

  • Since: 2003/2/6 2


Coz, execute permission on a directory actually means listing permission

Cheers,

5
jmass
Re: CHMOD Recommendations
  • 2005/1/6 7:15

  • jmass

  • Friend of XOOPS

  • Posts: 524

  • Since: 2003/12/18


I would like to reset the permissions on my entire install. Anyone know a good way to do this?

I thought of doing a ls -r /www > filename then parsing the file and putting the correct permissions, and running it as a script. Any ideas of a better way?

6
sudhaker
Re: CHMOD Recommendations
  • 2005/1/6 15:38

  • sudhaker

  • Not too shy to talk

  • Posts: 117

  • Since: 2003/2/6 2


It is simply not possible using PHP script running under (apache/nobody) privilege.

Till now, I was doing it by making the whole tree on my local Linux system.Then these steps: set permissions -> tar+gzip -> upload -> extract using cPanel file manager.

Either FTP CHMOD or SHELL ACCESS will be required.

Wait, I'm working on this SCRIPT which will do it using FTP CHMOD. Stay tuned.

Cheers,

7
evylrat
Re: CHMOD Recommendations
  • 2005/2/16 10:59

  • evylrat

  • Not too shy to talk

  • Posts: 164

  • Since: 2004/2/25


Sudhaker, I'd be very interested in this script as I do not have shell access to my host at this time. Using Filezilla to CHMOD all files takes forever! I'm still trying to get the damned site to work. Hosting at home SO much easier...

8
sudhaker
Re: CHMOD Recommendations
  • 2005/4/2 2:59

  • sudhaker

  • Not too shy to talk

  • Posts: 117

  • Since: 2003/2/6 2


Check the cPanel scripting using my zipftp

Login

Who's Online

243 user(s) are online (164 user(s) are browsing Support Forums)


Members: 0


Guests: 243


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits