Closed stottj closed 1 year ago
in chmod rwx displays what the status of permissions are for a file depending on the class of user (owner,group,other).
symbolic mode could show a file as rwxr--r-- which would mean the user class(owner) can read(r), write(w) and execute(x). While the group class (group owning the file) would be able to read the file. Lastly the last three letters define permissions for the other class (non-user or group class individiuals) showing they dont have access to anything.
Another way to set permissions is to use numerical permissions. chmod will use 3 digits ranging from 0-7 for designating the user/group/other class rights. ie 740 would mean user has r,w,x/group has r/others have none.
Ex 1 touch test.txt chmod a=r test.txt
Ex 2 touch test.sh chmod a=x test.sh
Ex 3 chmod g+w test.txt
Ex 4 chmod 644 test.txt
Common issues for using chmod is giving the wrong permissions at the wrong level. Becareful to not remove your permissions, really bad if you do it while using ssh, as you will have to re-add them or need to use a backup to go to a previous version. Careful on the -R usage as this is recursive so it might affect more than just the file you intended.
👍🏻
Ticket: Understand and Modify File Permissions with
chmod
Summary
Learn how to understand and modify file permissions using the
chmod
command in a Unix-like operating system.Description
Objective: Gain a comprehensive understanding of file permissions and how to modify them using the
chmod
command.Scope:
chmod
Learning Tasks
File Permission Basics:
r
), Write (w
), and Execute (x
).Syntax and Basic Usage of
chmod
:chmod
to change permissions on a file or directory.Specify Permissions:
Best Practices and Warnings:
chmod,
including potential pitfalls and how to avoid them.Hands-on Practice:
Troubleshooting:
chmod
and learn solutions for them.Learning Goals
chmod.
Priority