GUIDE

The road ahead will be long and our climb will be steep

How to Use Chmod in Unix/linux

| Comments

File permission modify command: chmod

  • Usage: chmod XXX file   
# XXX: owner/group(users in owner's group)/otherUsers

x = 4: 'read' permission
x = 2: 'write' permission
x = 1: 'exec' permission
  • Example:
sudo chmod 600 file (only owner has read, write permission)
sudo chmod 644 file (owner has read and write permission, group users and other users has only read permission)

sudo chmod 700 file (only owner has read, write and exec permission)
sudo chmod 666 file (everyone has read, write permission)
sudo chmod 777 file (everyone has read, write and exec permission)

sudo chmod go-x file (cancel the exec permission of group and other users)

Comments