Skip to main content

File permission in Linux

 

 There are seven types of files in linux.

- Regular File

d directory

b block device file

c character device file

s socket file

p pipe file

l link file

Assigning permission

Syntax: chmod  (u/g/o/a)  (+/-/=) (r/w/x/-)  <file name/path>


u - user

g -group

o - others

a - all


r read

w write

x execute


+ add permission

- remove permission

= assign permission


Permission using numbers

4 read

2 write

1 execute


Changing ownership


Syntax: chown <username>:<groupname> <file / directory name>


Access control list


setfacl -m u:<username>:<permission>  <file name>

sefacl -x  u:<username> <file name>

getfacl <file name/directory>

 

Special permissions

suid
sgid
sticky bit

Comments

Popular posts from this blog

Booting Process in Linux

  What is booting process? Basically how system starts and we get GUI is called as booting process. 1.BIOS/UEFS BIOS is a Basic input and output system. UEFS is a unified extensible firmware.  2. Master Boot Loader It has the total size of 512 kb.     446 kb for boot loader     64  kb for partition table     2 kb for future reserved 3. Boot Loaders Boot loader in RHEL8 and RHEL9 is grub2. It has location of kernal. GRUB2 is stand for Grand Unified Boot Loader. 4.Kernal   Kernal loads in system and take command of systems. 5.Systemd This is the first process of linux system. 6.Targets Simply target means user console(GUI/CLI)