CyberSecurity part 5
So on to video 3 of 8, I will maintain the login link so that you don't need to go hunting back through previous posts.
- Bash Basics Part 3 of 8 | Privileges and Permissions. 30 mins
- Bash Basics Part 3 of 8 | Privileges and Permissions. – invideous
Discuss
Summary
Video starts off correcting an error from the first video, presenter forgot to cover the copy (cp) command, this is discussed at the start of the video.
Example 1 – make a backup of a file
cp file1.txt file2.bak.txt
Example 2 – Copy a file to home directory
Lets say we are in /home/user/junk (like in the video):-
cp file1.txt ~/ will copy to home directory. You can use cd,, to drop down a level in the file system to /home/user to confirm this.
Also use wildcards e.g
cp *.txt will copy any files with .txt as the extension.
User permissions
chmod – change mod using sudo on its own has a time out sudo -s assumes the root user to root until you type exit
root user has a # normal users have $
changing owner permissions
chown – change owner
chown user:group file.txt
You need to be root for this so use sudo chown user:group file.txt
Tags
Mastodon | Peertube | Join Mastodon |
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.