0% found this document useful (0 votes)
6 views22 pages

moving-files-slides

The document provides an overview of file permissions in operating systems, detailing read, write, and execute permissions for files and directories. It explains how to change permissions using symbolic and numeric modes, as well as default permissions and umask settings. Additionally, it covers special permissions like SUID, SGID, and the sticky bit, along with commands for copying, backing up, and moving files.

Uploaded by

akym
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views22 pages

moving-files-slides

The document provides an overview of file permissions in operating systems, detailing read, write, and execute permissions for files and directories. It explains how to change permissions using symbolic and numeric modes, as well as default permissions and umask settings. Additionally, it covers special permissions like SUID, SGID, and the sticky bit, along with commands for copying, backing up, and moving files.

Uploaded by

akym
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Moving Files

Mateo Prigl
SOFTWARE DEVELOPER
File Permissions

OS
File Permissions

Permissions File Directory

Read (r) Open and read List the contents


r

Add, remove and


Write (w) Edit (modify) contents
rename files within it

Execute
Execute (x) (executable file)
Enter inside (cd into it)
Changing Permissions
File Permissions (symbolic mode)

u user

= set permissions

g group

chmod + add permission


r w x filename
o other

- remove permission
a all
Changing Permissions
File Permissions (absolute/numeric mode)

4 2 1
r w x
1 0 0 1 --x
chmod 2 0 1 0 -w- filename
4 1 0 0 r--
1+2=3 0 1 1 -wx
Changing Permissions
File Permissions (absolute/numeric mode)

rwxr–xr-x
4 2 1 4 1 4 1

chmod 7 5 5 filename
111 101 101
Demo

Default permissions with umask


Default UNIX Permissions

File Permission Directory Permission

666 777
rw-rw-rw- rwxrwxrwx
Default File Permissions

Default
6 6 6 rw-rw-rw-
permissions

Umask - 0 2 2 --- -w- -w-

6 4 4 rw- r-- r--


Default Directory Permissions

Default
7 7 7 rwxrwxrwx
permissions

Umask - 0 2 2 --- -w- -w-

7 5 5 rwx r-x r-x


Demo
File owners and groups
Creating users and groups
Run commands as another user
- Usually as root
sudo
Faster and safer then using the root
account directly
Demo

Glob qualifiers for file permissions


Glob Qualifiers for Group Permissions

A I E
Read permission Write permission Execute permission
Demo
Special file permissions
- SUID
- SGID
- Sticky bit
Special Permissions in Numerical Mode

SUID SGID Sticky bit


4 2 1

s s t
Special Permissions Representation

SUID SGID Sticky bit


s s t

r ws rws rwt
Special File Permissions

Permissions File Directory

Run file as a file


SUID (s or S)
r owner

Run file as a
All of the files inside of it will
SGID (s or S) member of the
belong to the directory group
file group
Prevents files inside of it from
Sticky bit (t or T) being removed by anyone but
the owner of that file
Demo

Copying files with cp


Demo

Backing up files with rsync


Demo

Moving and renaming files with mv


File permissions
- read, write, execute
- owner, group, other

Summary Creating users and groups


Umask
Special permissions
- SUID, SGID, Sticky bit

Copying files with cp


Backing up files with rsync
Moving and renaming files with mv

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy