Jump to content

question about chmod and permissions


axel_2078
 Share

Recommended Posts

I have a question regarding changes to permissions using chmod. When you make changes to the group using the chmod command, that affects only the primary group to which you are a member, correct? What if you are a member of multiple groups? How would that work? Also, what if you are in, say the Users group and Bob is in the Accounting group. Bob needs to be able to read and make changes to some of your files. How do you give him permission to do this using chmod?

 

[moved from Everything Linux by spinynorman]

Link to comment
Share on other sites

I think you are misunderstanding. You are changing the permissions of the group of the file/directory

 

[root@desktop cgi-bin]# ls -l seti.pl

-rwxr-xr-x 1 apache apache 15652 Mar 21 01:26 seti.pl

 

This is not really a good example, cuz even this confuses me. omar is in group apache, so he actually has rwx permissions since apache is designated as both owner and group, I guess.

So, to be safe, I guess you would:

chown <<your user>>:accounting your-file

chmod 0775 your-file

Then you and all members of the accounting have rwx permissions, but everyone else just has r-x permissions.

Link to comment
Share on other sites

try looking up GUID and chown. these would be more appropriate.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...