|
Command
|
Purpose
|
ls -l |
View permissions
|
stat FILE |
Detailed file info
|
chmod MODE FILE |
Change permissions
|
chown USER FILE |
Change owner
|
chgrp GROUP FILE |
Change group
|
umask |
View default permissions
|
umask 022 |
Set default permissions
|
|
600
|
Owner RW
|
|
644
|
Owner RW, Others R
|
|
700
|
Owner RWX
|
|
755
|
Owner RWX, Others RX
|
|
777
|
Everyone RWX (Avoid)
|
|
Command
|
Purpose
|
getfacl FILE |
View ACL
|
setfacl -m u:USER:rwx FILE |
Add ACL
|
setfacl -x u:USER FILE |
Remove ACL
|
setfacl -b FILE |
Remove all ACLs
|
|
Command
|
Purpose
|
lsattr |
View attributes
|
chattr +i FILE |
Immutable
|
chattr -i FILE |
Remove immutable
|
chattr +a FILE |
Append only
|
|
Command
|
Purpose
|
find / -perm -4000 |
Find SUID files
|
find / -perm -2000 |
Find SGID files
|
chmod u-s FILE |
Remove SUID
|
chmod g-s FILE |
Remove SGID
|
|
Command
|
Purpose
|
chmod +t DIR |
Set Sticky Bit
|
chmod -t DIR |
Remove Sticky Bit
|
|
Command
|
Purpose
|
mokutil --sb-state |
Check Secure Boot status
|
mokutil --disable-validation |
Disable validation (MOK)
|
mokutil --enable-validation |
Enable validation (MOK)
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.