Introduction
In this post, You will learn how to control file and directory permissions in kali linux. If you have any doubt take a look at the below video ????????
Video
Let’s start ????
If you have any doubts you can watch the video above or you can ask questions in discord I have given my twitter profile link so you can ask there. ????????
https://odysee.com/@techyrick:d
https://twitter.com/HacklikeHacker
Granting Ownership to Individual User
To move ownership of a file or directory to another individual user you can use the below command.
chown moulik /home/rick
![](http://techyrick.com/wp-content/uploads/2023/04/Screenshot-2023-04-16-at-6.39.39-PM-1024x484.webp)
Checking Permission
To check for any file or directory permissions we can use the below command that’s ????????
ls -l /home/rick
![](http://techyrick.com/wp-content/uploads/2023/04/Screenshot-2023-04-16-at-6.44.04-PM.webp)
Changing Permission
To change files or directory permission we can use the chmod command, But you should know which numeric denotes which permissions.
![](http://techyrick.com/wp-content/uploads/2023/04/Screenshot-2023-04-16-at-7.06.23-PM.webp)
![](http://techyrick.com/wp-content/uploads/2023/04/Screenshot-2023-04-16-at-7.06.33-PM.webp)
chmod 765 evil.php
![](http://techyrick.com/wp-content/uploads/2023/04/Screenshot-2023-04-16-at-7.09.05-PM.webp)
Changing Permissions with UGO
UGO syntax is very simple. Enter the chmod command and then the users you want to change permissions for, providing u for the user, g for group, or o for others, followed by one of three operators:
- -Removes a permission
- +Adds a permission
- =Sets a permission
![](http://techyrick.com/wp-content/uploads/2023/04/Screenshot-2023-04-16-at-7.15.57-PM.webp)
Conclusion
In this post, You should learn about Linux file permission. You may have not learned many here, but all the above are useful.