Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

system_engineering-devops

system_engineering-devops/0x01-shell_permissions Part 1

What do the commands chmod, sudo, su, chown, chgrp do Linux file permissions How to represent each of the three sets of permissions (owner, group, and other) as a single digit

0x01-shell_permissions

Applied Commands

  • What do the commands chmodsudosuchownchgrp do
  • Linux file permissions
  • How to represent each of the three sets of permissions (owner, group, and other) as a single digit
  • How to change permissions, owner and group of a file
  • Why can’t a normal user chown a file
  • How to run a command with root privileges
  • How to change user ID or become superuser

Other uses

  • How to create a user
  • How to create a group
  • How to print real and effective user and group IDs
  • How to print the groups a user is in
  • How to print the effective userid

0-iam_betty

!/bin/bash
su betty

1-who_am_i

!/bin/bash
whoami

2-groups

#!/bin/bash
groups

3-new_owner

#!/bin/bash
chown betty hello

4-empty

#!/bin/bash
touch hello

5-execute

#!/bin/bash
chmod u+x hello

6-multiple_permissions

#!/bin/bash
chmod ug+x,o+r hello

7-everybody

#!/bin/bash
chmod a+x hello

8-James_Bond

#!/bin/bash
chmod 007 hello

9-John_Doe

#!/bin/bash
chmod 753 hello

README.md

echo 'repo description here' > README.md

If you have any questions please leave it on the comment box bellow.

See part 2: system_engineering-devops Part 2

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
SCISIZ TMS ANTHONY STILL jpg

Severe thunderstorm watch for large portion of Ontario Canada

Next Post
Low_level_programming

Low_level_programming/000-hello_world Part 1

Please Leave a comment on comment section, let me know what you think about this article.

Related Posts
Hey, if you have any questions and want to talk to one of our specialists chat up here:
Chat me up