5. With three different permissions (read, write, and execute) and three differe
ID: 3748256 • Letter: 5
Question
5. With three different permissions (read, write, and execute) and three different categories of user (owner, group, and world), how many different combinations of permissions exist that may be applied to a file or directory? Why? 6. Is there a permission on a directory that allows me to create a file in that directory but not see the existence of that file? If so, provide the necessary commands to create and set the permissions on the directory. If not, explairn why not. 7. Can I delete a file even though I can't see its contents or modify the contents of the file? If so, provide a sequence of commands to exhibit this behavior. Be sure to show the commands that demonstrate you get an error if you try to see the contents of the file or change the contents of the file. If not, explain why not. 8. Provide and demonstrate a single UNIX command, using wildcards, pipelining, and redirection, that uses "cat" to obtain the contents of all files in the /etc directory that begin with a lower-case letter, sorts the contents ACROSS ALL THE FILES (don't just sort each individual file), discards duplicates lines, and provides a count of the resulting number of lines. If the command results in any errors, have those errors written to a file called "errors.txt"Explanation / Answer
Please Note: According to the Chegg Answering Guidelines, as the post contain more than One Question, I have answered the first question here. For receiving the answer to the rest of the Questions, please Re-post for the other Questions.
Q5) With 3 different permissions - read, write, execute and 3 different categories of user - owner, group, world, how many combinations of permissions exists that maybe applied to a file or directory?
Why?
Answer)
The different combinations of permissions - read, write, execute which are applied to a file or directory according to the different categories of users, owner, group, world. The examples of such will be as:
---------- no permissions for any group of users
-rwx------ read, write, & execute only for owner users
-rwxrwx--- read, write, & execute for owner and group users
-rwxrwxrwx read, write, & execute for owner, group and others users
---x--x--x execute
--w--w--w- write
--wx-wx-wx write & execute
-r--r--r-- read
-r-xr-xr-x read & execute
-rw-rw-rw- read & write
-rwxr----- owner can read, write, & execute; group can only read; others users have no permissions
Now since, each category of users- owner, group, world have every 3 permissions namely - read, write, execute, we can have 9 parameters of read, write, execute when we combine for the 3 users.
Thus, 2^9 = 512 combinations will be there for the 3 types of users.
For each type of user, there will be - 2^9 combinations.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.