Professional Documents
Culture Documents
Linux Certification
Fourth Edition
Chapter 4
Linux Filesystem
Management
Objectives
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 2
Objectives
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 3
The Filesystem Hierarchy Standard
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 4
Table 4-1: Linux directories defined by the
Filesystem Hierarchy Standard
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 5
Managing Files and Directories
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 8
Managing Files and Directories
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 10
Managing Files and Directories
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 11
Finding Files
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 12
Finding Files
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 15
Linking Files
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 16
Linking Files
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 19
Linking Files
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 21
Linking Files
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 23
File and Directory Ownership
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 24
File and Directory Ownership
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 28
Interpreting Permissions
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 29
Changing Permissions
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 31
Changing Permissions
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 32
Changing Permissions
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 33
Default Permissions
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 34
Default Permissions
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 35
Default Permissions
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 36
Special Permissions
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 37
Defining Special Permissions
• SUID
– If set on a file, user who executes the file becomes
owner of the file during execution
• e.g., passwd command
– No functionality when set on a directory
– Only applicable to binary compiled programs
• Cannot be used on shell scripts
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 38
Defining Special Permissions
• SGID
– Applicable to files and directories
– If set on a file, user who executes the file becomes
member of the file’s group during execution
– If a user creates a file in a directory with SGID set,
the file’s group owner is set to be the directory’s
group owner and not the user’s primary group
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 39
Defining Special Permissions
• Sticky bit
– Previously used to lock files in memory
– Currently only applicable to directories
– Ensures that a user can only delete his/her own files
when given write permissions in a directory
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 40
Setting Special Permissions
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 41
Setting Special Permissions
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 42
Setting Special Permissions
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 47
Summary
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 48
Summary
CompTIA Linux+ Guide to Linux Certification, Fourth Edition © Cengage Learning 2016 50