Understand Linux File Permissions on Linux

Linux-Permission

The permissions associated with a file are assigned to owners, groups and everyone else on your Linux computer.

Example:

root@ubuntu:~# ls -lah apacheds-2.0.0-M15-i386.deb
-rw-r–r– 1 root root 9.4M Aug 18 14:53 apacheds-2.0.0-M15-i386.deb
root@ubuntu:~#
  • If first character is not a dask (-), it’s not a regular file, it can be a directory for a file linked to another.
  • The remaining characters devided into 3 groups, ower is rw- (Read, Write) , group r– (only Read), everyone r– (Only Read).
  • We can change permission by chmod command.
  • umask
    • When we create a new file or directory , permissions we get by default is depend on umask.
root@ubuntu:~# umask
0022
    • First character is umask is unused. So umask is 022.
    • umask 022 means default permission is 644 (rw-r–r–) for all new files and directories.

 

1. Understand Linux File Permissions

 

2. Modify permission on Linux

 

Thanks for using IThelpblog.com.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Go to top