Answer the question
In order to leave comments, you need to log in
Changing permissions for a specific group in Linux?
Tell me, please, I can not figure out how the commands are written correctly. There are a couple of tasks:
Answer the question
In order to leave comments, you need to log in
u - user
g - group
o - others (others)
permissions:
r - read( read )
w - write( write )
x - execution (execution)
g+x - give permission to group to execute
gx - take permission from group to execute
from each file has uid( user id ) and gid(group id)
change owner: chown username file
change group: chgrp groupname file
Grant the right to modify a file to a specific user
if the user does not own this file, then you need to read about acl
or you can add the user to the group that owns the file and the group has rights
1. File execution rights to the "staff" group :
Grant rights to the "staff" group: Grant
launch rights to the group:
Grant launch rights to everyone (including the group):
2. The right to modify the file to the user "user" :
chown user /home/user/scripts/script.sh
chmod u+rw /home/user/scripts/script.sh
chown :staff /home/user/scripts/script.sh
chmod g+r /home/user/scripts/script.sh
chown -R :staff /home/user/scripts
chmod -R g+rw /home/user/scripts
man chown
man chmod
Tell me, how can I set the rights so that they are saved for new files in the folder? I have a mail folder /var/mail/Maildir with subfolders new, cur, tmp. All of these folders are given 775 permissions, but when new files get there, they are all read/write user-owner and you have to manually write chmod 775 to get the group access too.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question