View Linux File Permission and Directory Permission on Fedora using ls Command



Computer Configuration GNU Linux Fedora using Linux Command

 

   The Linux file permission and Linux directory permission can be view using the ls command.  The command example below show the step by step using ls command to view the Linux file permission and Linux directory permission on Linux Fedora system. 

 

View Linux file permission and directory permission on current directory:

[root@fedora ~]# ls -l

total 248

-rw------- 1 root root   3658 2008-05-20 08:26 anaconda-ks.cfg

drwxr-xr-x 3 root root   4096 2009-01-21 02:17 Desktop

drwxr-xr-x 2 root root   4096 2008-05-20 08:55 Documents

drwxr-xr-x 2 root root   4096 2008-05-20 08:55 Download

-rw-r--r-- 1 root root  72032 2008-05-20 08:25 install.log

-rw-r--r-- 1 root root   9766 2008-05-20 08:14 install.log.syslog

-rw------- 1 root root 119241 2008-08-03 05:07 mbox

drwxr-xr-x 2 root root   4096 2008-05-20 08:55 Music

drwxr-xr-x 2 root root   4096 2008-05-20 08:55 Pictures

drwxr-xr-x 2 root root   4096 2008-05-20 08:55 Public

drwxr-xr-x 2 root root   4096 2008-05-20 08:55 Templates

drwxr-xr-x 2 root root   4096 2008-05-20 08:55 Videos

[root@fedora ~]#

 

View Linux file permission using ls command:

[root@fedora ~]# ls -l install.log

-rw-r--r-- 1 root root 72032 2008-05-20 08:25 install.log

[root@fedora ~]#

 

File Permission Explanation:

 

Linux Directory permission:

View Linux Directory permission on Fedora

    1.   d  <= indicate directory

    2.   rwx <= indicate permission for user

    3.   rwx <= indicate permission for group

    4.   rwx <= indicate permission for other

 

r,w,x and - represent:

    -   <= no permission

    r   <= read permission

    w   <= write permission

    x   <= execute permission

 

Linux File Permission:

View Linux File Permission on Fedora

    1.   -  <= indicate file

    2.   rwx <= indicate permission for user

    3.   rwx <= indicate permission for group

    4.   rwx <= indicate permission for other

 

r,w,x and - represent:

    -   <= no permission

    r   <= read permission

    w   <= write permission

    x   <= execute permission

 




0 comments: