Operating System - HP-UX
1833729 Members
2475 Online
110063 Solutions
New Discussion

Re: Proper Permission Rights Settings

 
SOLVED
Go to solution
TheJuiceman
Super Advisor

Proper Permission Rights Settings

What are the proper permission rights that should be assigned to volumes such as /etc, /opt, etc? Also, what about secure files such as /etc/passwd? Just doing a bit of house-cleaning. Thanks.
5 REPLIES 5
Scott Van Kalken
Esteemed Contributor
Solution

Re: Proper Permission Rights Settings

everyone has to have read access to /etc/passwd or they wont be able to log in.

I generally make it 444

as for /opt/ and /etc

well, depends.

I have varying permissions for applications in /opt and also varying groups.

group A can execute APP A but not APP B and so on.

Depends on your environment.

Scott.
Steven Sim Kok Leong
Honored Contributor

Re: Proper Permission Rights Settings

Hi,

For most of the system directories, should be 555.

$ ll -d /etc /opt /usr /
drwxr-xr-x 26 root root 2048 Mar 4 13:48 /
dr-xr-xr-x 27 bin bin 6144 Mar 4 13:48 /etc
dr-xr-xr-x 28 bin bin 1024 Feb 14 10:06 /opt
dr-xr-xr-x 24 bin bin 1024 Jan 2 11:39 /usr

For /etc/passwd, should be 444 as stated.

If you are performing housekeeping, check your system for all-writeable files as well as setuid/setgid files as well.

Hope this helps. Regards.

Steven Sim Kok Leong
federico_3
Honored Contributor

Re: Proper Permission Rights Settings

the permissions should be set as:

drwxr-xr-x /
dr-xr-xr-x /etc
dr-xr-xr-x /opt
dr-xr-xr-x 24 /usr

For /etc/passwd, should be 444


Federico

Peter Kloetgen
Esteemed Contributor

Re: Proper Permission Rights Settings

Hi Bobby,

the permissions described by all others here are correct, but you asked about the permissions for /etc/passwd, which are very important, for the reason that this file contains the most important user information:

r-xr-xr-x, or 444 in octal numbers are the correct settings here. Every user MUST have the read- permission for this file, otherwise he won't be able to login! The login- processes like getty read their user information here, and if this file is not readable for each user, login will fail. Also in /usr, where most user binaries are stored, the users need read- and execute- permission to be able to run commands.

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping
TheJuiceman
Super Advisor

Re: Proper Permission Rights Settings

Thank you all for taking the time to answer my inquiry. These suggestions will definitely help me "tidy up". Thanks.