Translations:Linux introduction/22/en
Jump to navigation
Jump to search
- Prevent group members and all others to read or modify the file
secret.txt
:[name@server ~]$ chmod go-rwx secret.txt
- Allow everybody to read the file
public.txt
:[name@server ~]$ chmod a+r public.txt
- Make the file
script.sh
executable:[name@server ~]$ chmod a+x script.sh
- Allow group members to read and write in the directory
shared
:[name@server ~]$ chmod g+rwx shared
- Prevent other users from reading or modifying your home directory:
[name@server ~]$ chmod go-rw ~