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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...