Chmod/bin/chmod
chmod [{ugoa}{+-=}{rwx}] [file or directory]
chmod [mode=421] [file or directory]
-R Recursive modification
Only Root and owner can modify permissions for a file or directory
U owner G-owned group O other person a owner
chmod u+x file name
chmod u+x,o-r file name
chmod g=rwx file name
R--4, W--2, X--1
chmod 760 file name
Root User:
Mkdir-p/temp/test.dir
Touch/temp/test.file
chmod 777/temp
Useradd MEINV
passwd MEINV
MEINV Users:
rm-rf/temp/*
The deletion was successful.
|
|
Filename |
Directory |
| R |
Read permissions |
You can view the contents of the file (Cat,more,head ...) |
Can list content in a directory (LS) |
| W |
Write permissions |
Can modify the contents of the file (VIM) |
You can create and delete files in the directory (MKDIR,TOUCH,RM) |
| X |
Execute permissions |
Can execute file |
Access to directory (CD) |
Linux Rights Management commands chmod, files, and directories for the meaning of permissions