Zookal
Zookal

We’d love to hear any feedback or comment from you!

© 2011-2021 Zookal Pty Ltd

View question and answer

From our collection of questions and answers
Engineering · Computer Science
Question details

List the commands required. If you have you have a Linux/UNIX windows emulators, VM ware player or workstation verify the correctness of your Linux assignments:

Security from Week 7                                               

1. Let’s learn a little bit about file permissions. Go to your home directory and run:

$ ls –la

Take a screenshot.

On the left side of the output you see the following:

CS3307Unit7SS.JPG

rwx is for read, write, and exectute permissions, respectively.

2. Create an empty file called “A.txt”. Let’s look at the file permissions for “A.txt”.

$ ls –l A.txt

What does the file permissions (the portion shown above) read for “A.txt”?

3. Let’s add executable permissions to “A.txt” for our user.

$ chmod u+x A.txt

Now check the file permissions for “A.txt”. What does is say for “A.txt”?

4. Let’s remove group read permissions to “A.txt”.

$ chmod g-r A.txt

Now check the file permissions for “A.txt”. What does it say for “A.txt”?

5. Sometimes it is easier to provide permissions for user, group, and others all in one command. For this we use octal values. This is the most common form for representing file permissions.

Octal Value

Permission

4

Read

2

Write

1

execute/search

Octal Value

Permission

7

r w x

6

r w -

5

r – x

4

r - -

3

- w x

2

- w -

1

- - x

0

- - -


6. Let’s give “A.txt” read and write permissions for everyone.

$ chmod 666 A.txt

Now check the file permissions for A.txt. What does it say?

7. Let’s give the owner read, write, and execute permissions; give the group read and write permissions; and give all others read permissions for “A.txt”.

$ chmod 764 A.txt

Now check the file permissions for “A.txt”. What does it say?

Answer
Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.

Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.