assignment on this work will require scripting


Assignment On: This work will require scripting the use of various bash commands and / or small programs that involve directory and file structures.  

1) Create a user named testuser using sudo to run the add user command. Log in as that user, su will do the trick. Create a file DONOTTOUCH which is writeable only by testuser. Create an executable CHANGETHATFILE that modifies DONOTTOUCH which is read and execute for ‘others’ and, in addition, has a setuid bit such that other users who execute that program can run as testuser to  modify DONOTTOUCH. Script your demonstration and any code you have written. 

2) What does the ‘execute’ bit mean for a directory ? Demonstrate how the execute bit works for referencing files within directories. Does the execute bit need to be set for ANY directory on the path to a file you wish to reference ? Demonstrate and script evidence for the answers to the above questions.

3)A) “Links” can be of two types: hard and soft. You can create either by using bash command ln command. How do these differ? Note the following text from Stevens. “With a symbolic link, the actual contents of the file—the data blocks—store the name of the file that the symbolic link points to.” 

a. Demonstrate the above by creating a symbolic link to a file and a hard link to the same file. 

b. What difference is there when deleting a file using a hard or soft link. Demonstrate and explain. 

Solution Preview :

Prepared by a verified Expert
Application Programming: assignment on this work will require scripting
Reference No:- TGS0452655

Now Priced at $45 (50% Discount)

Recommended (93%)

Rated (4.5/5)