Linux Permissions: Difference between revisions
From James's Wiki
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
https://www.geeksforgeeks.org/linux-setfacl-command-with-example/ | https://www.geeksforgeeks.org/linux-setfacl-command-with-example/ | ||
list 'real' users | |||
cut -d: -f1,3 /etc/passwd | egrep ':[0-9]{4}$' | cut -d: -f1 | |||
create a new group | create a new group | ||
Line 16: | Line 19: | ||
give group seedbox rwx permission for /media/seedbox | give group seedbox rwx permission for /media/seedbox | ||
setfacl -m g:seedbox:rwx /media/seedbox/ | setfacl -m g:seedbox:rwx /media/seedbox/ | ||
show facl info | |||
getfacl /media/seedbox/ |
Latest revision as of 01:02, 18 July 2024
https://www.geeksforgeeks.org/linux-setfacl-command-with-example/
list 'real' users
cut -d: -f1,3 /etc/passwd | egrep ':[0-9]{4}$' | cut -d: -f1
create a new group
sudo groupadd mynewgroup
view groups of a user
groups exampleusername
show ids associated with groups etc
id exampleusername
add user to group
usermod -a -G examplegroup exampleusername
give group seedbox rwx permission for /media/seedbox
setfacl -m g:seedbox:rwx /media/seedbox/
show facl info
getfacl /media/seedbox/