Common operations of Linux file permissions

To view and modify file permissions in linux, we must use commands to operate, not just a few clicks like windows. Let's briefly introduce the relevant commands in linux

 

View permissions command
To view the relevant permissions of a directory, you can use the command ls -lD, or directly use ls -la

Such as

ls -l  /opt/packa ge //This means viewing the /opt/packa ge directory


Modify permission command

chmod 777 filename

1.chmod 577 /home/stuser -R
2.umask -p 0200
3.chown XXXX YYYY (XXXX is the user name YYYY is the file name)
 
permission list

-rw------- (600) Only owner has read and write permissions
-rw-r--r-- (644) Only owner has read and write permissions, groups and others Only read permissions
-rwx------ (700) Only owner has read, write, execute permissions
-rwxr-xr-x (755) Only owner has read, write, execute permissions, group Group and others only have read and execute permissions
-rwx--x--x (711) Only owner has read, write, execute permissions, group and others have only execute permissions
-rw-rw-rw- (666) Everyone has read and write permissions -
rwxrwxrwx (777) Everyone has read and write permissions

 

linux binary permissions

Readable, writable, and runnable, it means 111 in binary, and 7 when converted to decimal.
Readable, writable, and non-operational, it means 110 in binary, and 6 when converted to decimal.
Readable, non-writable, and runnable, it means 101 in binary, and 5 when converted to decimal.

 

Linux file permissions refer to the tutorial organized by another buddy: http://www.cnblogs.com/peida/archive/2012/11/29/2794010.html

Linux acl permissions introduction recommended tutorial: http://linuxguest.blog.51cto.com/195664/124107

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326590062&siteId=291194637