Changing File Permissions

You can change any file permission by using the command chmod
$ chmod 755 file
$ ls -l file
-rwxr-xr-x 1 root users 1656 Feb 17 01:11 filename
Numbers are based on three kinds of file permission.

  • Read=4
  • Write=2
  • Execute=1

In the given list 755 means the user will be having read, write and execute permission as 7=4(read)+2(write)+1(execute) and othere will be having read and execute permissions, 5=4(read)+1(execute)(read and execute)

Leave a Reply