Professional Documents
Culture Documents
Lab Report 3
Lab Title: Linux Shell commands for file operations and their
rights
Submitted By:
Talha Malik(21-CS-025)
Muhammad Jahangir(21-CS-089)
Basit Ali(21-CS-104)
Muhammad Alrayan(21-CS-107)
Solution:
1. User: Whoever creates the files becomes the owner. He able to delete, modify, and create a file.
In Linux, it is denoted by “u”
2. Group: A file used by multiple users is known as a group. All users have the same permission
provided by the owner/user. The owner/user can change the permission according to his will. In
Linux, it is denoted by “g”.
3. Other: Any person who can use the file is considered as “other”. It can be the user or group. In
Linux, it is denoted by “o”.
Example,
Q2: Show Simulation results after performing the following tasks by using suitable commands in
A-E
a. Create a blank text file in your home directory with Teacher data.
c. Change the directory to teacher and copy your text file in this directory.
g. Assign permission to write only to the user (do it twice by using both symbolic and numeric methods).
k. Assign permission to read-only to the user (do it twice by using both symbolic and numeric methods).
p. Assign permissions of read and write only to the user (do it twice by using both symbolic and numeric
methods).
r. Assign all permissions to the user (do it twice by using both symbolic and numeric methods).
t. Assign permission to read and execute only to the group (do it twice by using both symbolic and
numeric methods).
v. Assign all permissions to all users (do it twice by using both symbolic and numeric methods).
Description:
Assigning the permission of the read and write only to the user then verifying if the permission
has been assigned then again changing the permission for the users only again verifying then
giving all the permission to the users then again verifying if the permissions are changed for the
users.