UNIX Permissions:
chmod
ls -l
chmod u=rwx, g=rx, o=r row*
The wildcard expression row* specifies that the permissions granted in
the command applies to all files and directories that start with "row" in the current directory.
w = write
r = read
x = execute
There are a couple different kinds of files with permissions indicated by the first letter of the string:
* '-' : a regular file
* 'd' : a directory - ex: drwx------ 4 root root 138 Sep 23 21:15
* 'l' : a symbolic link
* 'b' : a block device
* 'c' : a character device
* 'p' : a named pipe
* 's' : UNIX domain socket
The difference between a character device and a block device is in how much data a device can take/give to the computer. A character device can give/receive 1 character (one byte) at a time. A block device handles chunks/blocks of data; typically a block is 512 bytes, but it can vary depending on the device.
------
u = user
g = group
o = others
a = all
user,group,other
-r-xr-xr-x 1 root
root 21313888 Sep 29 2001 tiger1.jpg
example: chmod u=rwx,g=rx,o=r row*
To add permissions: "+"
chmod g+w row
To remove permissions: "-"
chmod go-w row
| Mnemonic (rwx) Premissions | Binary
Equivalent
|
Numeric Equivalent |
| --- --x -w- -wx r-- r-x rw- rwx |
000 001 010 011 100 101 110 111 |
0 1 2 3 4 5 6 7 |