Question

2. Without changing the ownership of test directory in your home directory, explain what the chmod...

2. Without changing the ownership of test directory in your home directory, explain what the chmod command would be to make sure that super, as a member of the is229 group, had no ability to read, write, or execute files in the test directory.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The answer for the question is given below in case you face any difficulties you can ask me in comments. Please upvote and if you aren't satisfied with answer ask me in comments i will be happy to help you out.

Answer:

Without changing the ownership of the 'test' directory we can edit the file of directory permissions to restrict only the owner to be able to access the files for that we can use chmod command to change the file permissions.

example :

STEP 1 : create a directory named 'test' using mkdir test

STEP 2 : run command ls -l test to see the file permissions

it should look like : drwxrw-rw- 2 nrsc nrsc 38 Feb 17 11:45 test

STEP 3 : run sudo su to enter into root mode and then create a file named vai.txt and exter some text in it.

Lets change the permissions using chmod

chmod -R 070 test

It must look like this :

d---rwx--- 2 nrsc nrsc 38 Feb 17 11:50 test

STEP 4: Exit root mode using Ctrl + D

STEP 5 : try to run cat test/vai.txt

it will give you this output

[nrsc@rhel-orf1 ~]$ cat test/vai.txt
cat: test/vai.txt: Permission denied
[nrsc@rhel-orf1 ~]$ cd test
-bash: cd: test: Permission denied

IF you want that no one should be able to access that directory do

chmod -R 000 test

this will prevent anyone from accessing it.

Hence we have stopped a particular user from accessing a file and directory using chmod without changing the ownership of a directory.

Add a comment
Know the answer?
Add Answer to:
2. Without changing the ownership of test directory in your home directory, explain what the chmod...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. Navigate to your home directory by typing cd. Now type ls and notice that there...

    1. Navigate to your home directory by typing cd. Now type ls and notice that there is a subdirectory called Downloads. Now navigate to the root of the file system by typing cd /. From here, which single command would you use to navigate directly to the Downloads folder that is located in your home directory? The output of the command would be as follows: 2. From the Downloads directory which single command would you use to navigate back up...

  • Objective: Practice common UNIX commands. Procedure: The following list of Unix commands are given for self-learning....

    Objective: Practice common UNIX commands. Procedure: The following list of Unix commands are given for self-learning. Use 'whatis' or 'man' command to find out about each command. Your document should include the description or screen shots of the output from each of the command. Commands: df du gzip file history wget Changing access rights: chmod u+x Dir1.0            adds execute permission for the owner chmod go-w file1              removes write permission for the group and others chmod ugo=rw testfile     sets...

  • Really need help from 11 on: Create the directory structure IFT383FinalExam/Activities/Activity1 in your home directory. Using...

    Really need help from 11 on: Create the directory structure IFT383FinalExam/Activities/Activity1 in your home directory. Using the cat command, create a file named classRoster with the following fields, separated by a comma. Student ID First Name Last Name Grade Program of Study ASURITE ID (username) Add three records to your file. Display the contents of the file. Move the file classRoster to the directory Activity1. Go to the Activity1 directory. Display the directory you are in. Add read, write and...

  • (In Linux) 1. Create a file to write to from your script and save it as...

    (In Linux) 1. Create a file to write to from your script and save it as “.txt”. 2. Write the following information to the file that you created in Step 1: Today's date Your full name Your student ID The name of your course What directory you are in File permissions of the file that you created that allow everyone to read, write, and execute The long list of files in your current directory, providing all items and their process...

  • You have a bunch of text files in your home directory, and you are trying to...

    You have a bunch of text files in your home directory, and you are trying to find which ones contain the word "opportunity". What command would you type to search within all the files for the word "opportunity"?

  • Suppose that you wished to copy all of the text files from your fileAsst directory and...

    Suppose that you wished to copy all of the text files from your fileAsst directory and all of the files from your fileAsst/Planes directory into your current directory (without typing out the name of each individual file). What command would you give to make that copy?

  • QUESTION 1 From YOUR home directory, execute a find command string that will locate the file...

    QUESTION 1 From YOUR home directory, execute a find command string that will locate the file called resolv.conf. Include the -exec flag in the find command to cat the file to the screen. Begin your find search from the letc directory. Select the correct find command string below that will accomplish this. find /etc -name 'resolv.conf-cat f} \; find /etc -name 'resolv.conf' -exec cat {} \; find . -name 'resolv.conf' -exec cat {} \; O find / -name 'resolv.conf' -exec...

  • Objective : Write a C Shell script which copies all files(*.java and *.class) from your home dire...

    Objective : Write a C Shell script which copies all files(*.java and *.class) from your home directory to a new one, and Analyze the new directory information such as number of files, user permissions, and disk usage. Sample Output:                                                    << CS Directory Analysis >>      Date:   ============================================================ Current Directory: /home/tomss New Directory Created : /home/tomss/pgm01 File information Total Number of files : 22 files Directory files:   0 files Plain text files:   10 files File have read permissions: 3 files File have...

  • QUESTION 1 From YOUR home directory, execute a find command string that will locate the file...

    QUESTION 1 From YOUR home directory, execute a find command string that will locate the file called resolv.conf. Include the -exec flag in the find command to cat the file to the screen. Begin your find search from the letc directory Select the correct find command string below that will accomplish this. find /etc-name 'resolv.conf -cat D find /etc-name 'resolv.conf -exec cat 0 find. -name 'resolv.conf -exec cat 0\ find /-name 'resolv.conf' -exec cat 0 QUESTION 2 What find command...

  • I need some help< I keep getting this wrong and don’t understand why 2. 5. Challenge Children files Let’s test your file creation skills. Make sure you are on the ~/workspace directory and: 1.Creat...

    I need some help< I keep getting this wrong and don’t understand why 2. 5. Challenge Children files Let’s test your file creation skills. Make sure you are on the ~/workspace directory and: 1.Create the following files. Try creating them directly from the ~/workspace directory, all at once: test-website/index.html test-website/.website-config test-website/css/styles.css test-website/img/logo.png test-website/js/scripts.js 2.From your ~/workspace directory, list the test-website/css directory content including hidden files 3.Clear the terminal screen Once you have completed these tasks press the Check It button...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT