Linux modify permissions

On Linux systems have strict control over the file permissions for a file if the relative perform an operation, it must have the corresponding privileges to execute successfully.
Under Linux file permission type generally include read, write, execute. Corresponding to the letters r, w, x.
Linux has a particle size under authority of the owner, group, other groups of three. Each file can target three granularity, set a different rwx (read and write execute) permission. Typically, a file can only belong to a group of users and, if the other user would like to have access to the file, the user may be added to the group have permission, a user can belong to a plurality of groups simultaneously.
Usually on Linux file permissions are set and changed using the chmod command.

chmod [options] <mode> <file ...>
Options:
-c, --changes But like verbose Report only the when IS A Change Made (if the file permissions have changed indeed, it shows the change action)
-f , --silent, --quiet suppress most error messages ( if the file permissions can not be changed and do not display an error message)
-v, --verbose a Diagnostic for the Output file Every Processed (show details permissions changes)
--no Not do the root-Treat -preserve '/' Specially (The default)
--preserve to Fail-Operate the root Recursively ON '/'
--reference = RFile use RFile apos INSTEAD of the MODE MODE values
-R & lt, --recursive Change Directories and Files recursively (recursively all files and subdirectories in the current directory the same permissions change)
--help display this help
--version display version information
mode: permissions string in detail in the following format:
[ugoa. ..] [[+ - =] [rwxX] ...] [, ...], where
[ugoa ...]
u represents the owner of the file, g represents the owner of the file belonging to the same group (group) who, o represents other than human, a represents all (comprising three above).
[+ - =]
+ to add permissions, - indicates remove permissions, = represents a unique set permissions.
[rwxX]
R & lt represent read, w represents the writing, x represents an executable, X is only when this file is a subdirectory or file has been set through the executable.

file ...
file list (single or multiple files, folders)
common representation rights are:

-rw ------- (600) Only the owner has read and write permissions.
-rw-r - r-- (644) Only the owner has read and write permissions; and a group of users and other users only read access.
-rwx ------ (700) Only the owner has read, write, and execute permissions.
-rwxr-xr-x (755) owner has read, write, and execute permissions; and a group of users and other users only read and execute permissions.
-rwx - x - x (711) owner has read, write, and execute permissions; and the other is a group of users and users only execute permissions.
-rw-rw-rw- (666) all users have the file read and write permissions.
-rwxrwxrwx (777) all users have read, write, and execute permissions.

chmod 777 filename

https://www.cnblogs.com/huchong/p/9075201.html
https://www.cnblogs.com/kuyuecs/p/7797864.html

Guess you like

Origin www.cnblogs.com/HISAK/p/11639675.html