Frage | Antworten | |||
---|---|---|---|---|
Remove rights to write in a file for the file owner
|
chmod u-w myfile
|
|||
Remove rights to read in a file for the file owner
|
chmod u-r myfile
|
|||
Add rights to read and write in a file for the file owner
|
chmod u+rw myfile
|
|||
Remove rights to read in a file for the owner, group and others
|
chmod -r myfile
|
|||
Remove rights to write in a file for the owner, group and others
|
chmod -w myfile
|
|||
How to add group in the system?
|
groupadd finance
|
|||
How to list all groups?
|
getent group or cat /etc/group
|
|||
How to change owner for the file or catalog
|
chown user: group file or directory
|
|||
Remove rights to write in a file for the group
|
chmod g-w myfile
|
|||
Remove rights to read in a file for the group
|
chmod g-r myfile
|
|||
Add rights to read and write in a file for the group
|
chmod g+rw myfile
|
|||
Remove rights to write in a file for the others
|
chmod o-w myfile
|
|||
Remove rights to read in a file for the others
|
chmod o-r myfile
|
|||
Add rights to read and write in a file for the others
|
chmod o+rw myfile
|
|||
How to add user to the group
|
usermod -G finance user // relog to enable access to finance
|
|||
How to remove execute rights on files?
|
chmod ug-x -R finance
|
|||
How to remove execute rights on directories?
|
chmod ug+X -R finance
|
|||
How to add rights for all: owner, group and others for the file?
|
chmod a+r test1
|
|||
What is setgid
|
permission bit - gives permission as a group
|
|||
What is setuid
|
permission bit - gives permission as a user
|
|||
How to add setgid?
|
chmod g+s test1
|