5.3 Managing File Permissions and Ownership Flashcards
Permissions
drwxrwxr-x
the d indicates
file type - directory
Permissions
drwxrwxr-x
3 chars after d indicate permissions for
owner and user
Permissions
drwxrwxr-x
The next three characters, rwx, indicate the permissions of the
group owning the file also referred to as g
Permissions
drwxrwxr-x
the last 3 chars r-x indicate permissions for
anyone else aka other or o
permission
filetypes
contain data of any kind and can be modified, moved, copied and deleted
- (normal file)
permission
filetypes
y contains other files or directories and helps to organize the file system. Technically,
directories are a special kind of file
d (directory)
permission
filetypes
is a pointer to another file or directory elsewhere in the filesystem.
l (softlink)
permission
filetypes
a virtual or physical device, usually disks or other kinds of storage devices.
For example, the first hard disk in the system might be represented by /dev/sda
b (block device)
permission
filetypes
virtual or physical device. Terminals (like the main terminal on
/dev/ttyS0) and serial ports are common examples of character devices
c (character device)
permission
filetypes
s “conduits” passing information between two programs.
s (socket)
permission
file permissions
Stands for read and has an octal value of 4 (don’t worry, we will discuss octals shortly). This
means permission to open a file and read its contents
r
permission
file permissions
Stands for write and has an octal value of 2. This means permission to edit or delete a file
w
permission
file permissions
Stands for execute and has an octal value of 1. This means that the file can be run as an
executable or script.
x
permission
directory permissions
Stands for read and has an octal value of 4. This means permission to read the directory’s
contents, like filenames. But it does not imply permission to read the files themselves.
r
permission
directory permissions
Stands for write and has an octal value of 2. This means permission to create or delete files in a
directory, or change their names, permissions and owners. If a user has the write permission
on a directory, the user can change permissions of any file in the directory, even if the user has
no permissions on the file or if the file is owned by another user
w