Permision

File type
  • -, Normal file
  • d, Subdirectory
  • p, Named pipe
  • s, Socket
  • l, Symbolic link
  • c, Character device
  • b, Block device
  • File permission
  • chmod u=rwx,g=rx,o=r filename
  • chmod 754 filename
  • Directory permission
  • write allows creating new files inside of it
  • read allows you to list the files inside of it
  • execute allows you to enter it and access files (or other directories) inside
  • chmod -R ugo+rw /DATA/SHARE, modifies the permission of the specific folder and its child objects recursively
  • readme (755), temp (750)
  • user2 is not able to access readme file inside temp folder of user1 since temp of user2 is not assible for user1
  • Set Default Permission
  • For directories, the base permissions are (rwxrwxrwx) 0777 and for files they are 0666 (rw-rw-rw)
  • umask 022, default directory permissions are 755 and default file permissions are 644
  • SBIT
  • SUID (Set owner User ID up on execution), 4
  • SGID, 2
  • SBIT, 1
  • Attributes
  • lsattr, list file attributes
  • chattr, change file attributes
  • Availabe attributes
  • Reference
  • What is SUID, SGID and Sticky bit ?
  • SUID
  • umask
  • chattr