how to change the permissions for a file or dir in Linux or Unix
Simple Syntax:
chmod 744 yourfile.ext
Below Codes can be helpful to set permissions
400 = Read by owner
200 = Write by owner
100 = Execute by owner
040 = Read by group
020 = Write by group
010 = Execute by group
004 = Read by others
002 = Write by others
001 = Execute by others
777 = anyone can do anything (read, write, or execute)
755 = you can do anything; others can only read and execute
711 = you can do anything; others can only execute
644 = you can read and write; others can only read
Moreover you can get help for the command:
man chmod
Leave a Reply