In this project, I learned about Linux file permissions and how to use commands: chmod
, sudo
, su
, chown
, chgrp
, and more.
-
0. My name is Betty
- 0-iam_betty: script that switches current user to
betty
.
- 0-iam_betty: script that switches current user to
-
1. Who am I
- 1-who_am_i: script that prints the username of the current user.
-
2. Groups
- 2-groups: script that prints all groups the user is a part of.
-
3. New owner
- 3-new_owner: script that changes the owner of the file
hello
to the userbetty
.
- 3-new_owner: script that changes the owner of the file
-
4. Empty!
- 4-empty: script that creates an empty file called hello.
-
5. Execute
- 5-execute: script that adds execute permission to the owner of the file
hello
- 5-execute: script that adds execute permission to the owner of the file
-
6. Multiple permissions_
- 6-multiple_permissions: script that adds execute permission to the owner and the group owner, and read permission to other users, to the file
hello
.
- 6-multiple_permissions: script that adds execute permission to the owner and the group owner, and read permission to other users, to the file
-
7. Everybody!
- 7-everybody: script that adds execute permission to the owner, the group owner and other users, to the file
hello
.
- 7-everybody: script that adds execute permission to the owner, the group owner and other users, to the file
-
8. James Bond
- 8-James_Bond: script that sets the permissions to the file
hello
as follows:- Owner: no permission at all
- Group: no permission at all
- Other users: all the permissions
- 8-James_Bond: script that sets the permissions to the file
-
9. John Doe
- 9-John_Doe: script that sets the mode of the file hello to:
-rwxr-x-wx 1 julien julien 23 Sep 20 14:25 hello
-
10. Look in the mirror
- 10-mirror_permissions: script that sets the mode of the file
hello
the same asolleh
's mode.
- 10-mirror_permissions: script that sets the mode of the file
-
11. Directories
- 11-directories_permissions: script that adds execute permission to all subdirectories of the current directory for the owner, the group owner and all other users.
-
12. More directories
- 12-directory_permissions: script that creates a directory called
my_dir
with permissions 751 in the working directory.
- 12-directory_permissions: script that creates a directory called
-
13. Change group
- 13-change_group: script that changes group owner to
school
for the filehello
- 13-change_group: script that changes group owner to
-
14. Owner and group
- 100-change_owner_and_group: script that changes the owner to
vincent
and the group owner tostaff
for all the files and directories in the working directory.
- 100-change_owner_and_group: script that changes the owner to
-
15. Symbolic links
- 101-symbolic_link_permissions: script that changes the owner and the group owner of
_hello
tovincent
andstaff
respectively.- The file
_hello
is a symbolic link
- The file
- 101-symbolic_link_permissions: script that changes the owner and the group owner of
-
16. If only
- 102-if_only: script that changes the owner of the file
hello
tobetty
only if it is owned by the userguillaume
.
- 102-if_only: script that changes the owner of the file
-
17. Star Wars
- 103-Star_Wars: script that plays the Star Wars IV episode in the terminal.