Module – 2
LINUX FUNDAMENTALS
ASSIGNMENT
Submitted by: Wigglesworth
Date of Submission: 22-03-2025
Date of Resubmission: TBD
2. L2 - As a Linux root user Create Files/Directory in the same
Instance and change the ownership to a new user
Step:1: Login to AWS Account and go into EC2 Webpage. We have
created an EC2 Ubuntu Linux VM.
Access the Linux VM via Putty Tool.
Step:2:
Switch to super user using sudo su command.
Create a new user called newuser and also provide a password.
Step:3:
As a root user create a new directory under /opt directory and create a file under
the newly created directory.
Step:4:
Using ls –ld and ls –l command we are able to see that the directory and the file
in the directory has been created by the root user and the group is also root
Now using chown -R <user_name> <directory> command , we change the
owner from root user to the newly created user newuser.
Note : In the above command , we use -R to change the permission of the files
And the sub-directories inside the mentioned directory.
Step:5:
Now exit as root user and switch to the newly created user newuser using
su - <user_name> command.
Verify that newuser is the owner of the file and the directory.