2025 Linux Admin - Getting more advanced with Linux file permissions
Автор: Information Technology
Загружено: 2025-09-05
Просмотров: 149
In this Linux tutorial, we dive into advanced file permissions, default permissions, and special attributes. From experimenting with chmod numbers to utilizing umask, sticky bits, and immutable flags, this session demonstrates how Linux offers fine-grained control over file security.
What you’ll learn in this video:
Understanding numeric permissions with chmod (777, 124, 220, 315)
Checking and changing the default file creation mask with umask
Using symbolic umask (e.g., u=rwx,g=,o=)
Applying special directory permissions:
Sticky bit (chmod +t / 1777) for shared directories
Setgid on directories (chmod 2700)
Exploring where umask is set (~/.bash*, /etc/bash*)
Switching shell editing mode (set -o vi)
Making files immutable with chattr +i
Removing immutability (chattr -i) to allow deletion
Cleaning up with rm and testing restrictions
By the end of this session, you’ll understand:
How to calculate numeric file permissions
How default permissions are set with umask
The role of sticky bits and setgid in directories
How chattr makes files undeletable (immutable)
Why advanced permissions matter for system security
54 exit
55 clear
56 ls
57 cd temp
58 ls -ltrah
59 1 2 4
60 chmod 777 6
61 touch {a..g}
62 ls -ltrah
63 chmod 777 a
64 chmod 124 b
65 chmod 220 c
66 chmod 315 d
67 sudo rm 1 2 3 4 5 6 7 8 9
68 ls -ltrah
69 umask
70 touch 1
71 ls -ltrah
72 umask 017
73 touch 2
74 ls -ltrah
75 mkdir folder1
76 ls -ltrah
77 umask u=rwx,g=,o=
78 touch 3
79 mkdir folder2
80 ls -ltrah
81 exit
82 cd temp
83 mkdir folder4
84 ls -ltrah
85 grep umask ~/.bash*
86 ls -ltrah ~/
87 grep umask /etc/bash*
88 cd ~
89 ls -ltrah
90 set -o vi
91 grep umask ~/.bash*
92 ls
93 cd temp
94 ls
95 ls -ltrah
96 chmod +t folder4
97 chmod 177 folder2
98 chmod 1777 folder2
99 ls -ltrah
100 chmod 2700 folder1
101 ls -ltrah
102 chattr +i f
103 sudo chattr +i f
104 ls -ltrah
105 rm -rf *
106 ls -ltrah
107 rm f
108 sudo rm f
109 sudo chattr -i f
110 ls -ltrah
111 rm f
112 history
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: