Default file/dir permission for root/user? What are the default permission for creating file/directory in root and standard user?

Default file/dir permission for root/user? What are the default permission for creating file/directory in root and standard user?
Whenever you create file/directory it has the default permission(r,w,e)value. There default value depends upon there root/user.

Root Default permission-file/dir


Root default permission for directory is 755
Check it
step1: Login into the root
step2: create folder
step3: check it there permission value through ls -l command


[root@localhost ~]# mkdir folder
[root@localhost ~]# ls -l
drwxr-xr-x 2 root root 4096 Apr 14 15:07 folder


Root default permission for file is 644
Check it
step1: Login into the root
step2: create folder
step3: check it there permission value through ls -l command

[root@localhost ~]# touch file
[root@localhost ~]# ls -l
-rw-r--r-- 1 root root 0 Apr 14 15:09 file



Standard user Default permission-file/dir


Standard user default permission for directory is 775
Check it
step1: Login into the Standard user
step2: create folder
step3: check it there permission value through ls -l command

[kumar@localhost ~]$ mkdir folder
[kumar@localhost ~]$ ls -l
drwxrwxr-x 2 kumar kumar 4096 Apr 14 15:13 folder




Standard user default permission for file is 664
Check it
step1: Login into the Standard user
step2: create file
step3: check it there permission value through ls -l command

[kumar@localhost ~]$ touch file
[kumar@localhost ~]$ ls -l
-rw-rw-r-- 1 kumar kumar 0 Apr 14 15:15 file

Post a Comment

0 Comments