Operating System - HP-UX
1753701 Members
5241 Online
108799 Solutions
New Discussion юеВ

What is advantage of chmod 755?

 
natis
Frequent Contributor

What is advantage of chmod 755?

What is advantage of chmod 755? How do you think about that?
7 REPLIES 7
Pete Randall
Outstanding Contributor

Re: What is advantage of chmod 755?

Advantage? It depends.

Using chmod 755 gives rwxrw-rw- permissions. Whether that is an advantage depends on exactly what the file is and how you want it to be used/accessed/updated.


Pete

Pete
Steven E. Protter
Exalted Contributor

Re: What is advantage of chmod 755?

Shalom,

Advantage over what?

Its better than 777, which gives all users the right to read write or execute your file.

It takes away the rights of everyone else to change your file.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
A. Clay Stephenson
Acclaimed Contributor

Re: What is advantage of chmod 755?

You question is meaningless. What is the advantage of mode 755 as opposed to mode xxx?
Mode 755 is "better" than mode 777 or 775 in that only the owner of a file may write to it but in that respect is is "worse" than mode 700. If this is a data file then the 1's in each octet should also be cleared.
If it ain't broke, I can fix that.
Pete Randall
Outstanding Contributor

Re: What is advantage of chmod 755?

Sorry - make that rwxr-xr-x!


Pete

Pete
AwadheshPandey
Honored Contributor

Re: What is advantage of chmod 755?

chmod 755 will give you -rwxr-xr-x permisson, it will allow write permission only to owner of file and usefull for extra level of security.
It's kind of fun to do the impossible
Doug O'Leary
Honored Contributor

Re: What is advantage of chmod 755?

Hey

There is no advantage or disadvantage. As others have stated, it'll give you rwxr-xr-x permissions on files/directories. If that's what you need, then you're golden, if that's not what you need, then it's borked. As I said, no advantage or disadvantage.

For an example of where that permission set would be too restrictive: Setting /tmp or /var/tmp to 755, for instance, would pretty effectively break your system as quite a few processes need to be able to create tmp files in those directories.

For an example of where that permission set would be too permissive: setting /tcb (and lower files) or /etc/shadow to that permission set would allow people to see the encrypted passwords which would open them up to being cracked.

HTH;

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Bill Hassell
Honored Contributor

Re: What is advantage of chmod 755?

AS mentioned, there is no correct answer. 755 permissions for a simple data file is simply wrong because the data file is not supposed to be executable. On the other hand, if the target is a directory, it would be useful for directories that need to be accessible for searching by any user. But if you change /tmp to 755, a *LOT* of things will malfunction.

You need to study basic Unix documents on permissions along with security considerations.


Bill Hassell, sysadmin