Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Linux permissions

Character.	Effect on files.	Effect on directories

Read permission (first character)
-	The file cannot be read.	The directory's contents cannot be shown.
r	The file can be read.	The directory's contents can be shown.

Write permission (second character)	
- The file cannot be modified.	The directory's contents cannot be modified.
w	The file can be modified.	The directory's contents can be modified (create new files or directories; rename or delete existing files or directories); requires the execute permission to be also set, otherwise this permission has no effect.

Execute permission (third character)
-	The file cannot be executed.	The directory cannot be accessed with cd.
x	The file can be executed.	The directory can be accessed with cd; this is the only permission bit that in practice can be considered to be "inherited" from the ancestor directories, in fact if any directory in the path does not have the x bit set, the final file or directory cannot be accessed either, regardless of its permissions; see path_resolution(7) for more information.

s	The setuid bit when found in the user triad; the setgid bit when found in the group triad; it is not found in the others triad; it also implies that x is set.
S	Same as s, but x is not set; rare on regular files, and useless on directories.
t	The sticky bit; it can only be found in the others triad; it also implies that x is set.
T	Same as t, but x is not set; rare on regular files.
Source by wiki.archlinux.org #
 
PREVIOUS NEXT
Tagged: #Linux #permissions
ADD COMMENT
Topic
Name
2+1 =