Problem 6 (12 points): Answer each of the following questions assuming the permi
ID: 3849290 • Letter: P
Question
Problem 6 (12 points): Answer each of the following questions assuming the permissions settings string is –rwx-w-r-x .
a) Is this a file or a directory?
b) Who has the most control in this case: the user, the group, or others?
c) Who has both read and execute permission, but doesn’t have write permission (can select more than one): the user, the group, or others?
d) Who has write permission (can select more than one): the user, the group, or others?
e) Who has execute permission (can select more than one): the user, the group, or others?
f) What is the purpose of having permissions/ownership in Unix?
Explanation / Answer
Hi,
Please find the answers for the above questions:
A)These permissions are applicable for both file and directory.
B)The string -rwx-w-r-x shows the permissions for the user followed by group and others in sequence.
If we observe the sequence,the user has got all the permissions of read,write and execute,so in this case the user has most of the control,whereas the group has only write permission but no read and execute,the others has read and execute permissions but no permission to write.
C)Here the others are the one left with no permission for write.
D)The user and the group has got the write permission.
E)the user and the others have the execute permission.
F)
File ownership is an important component of Unix that provides a secure method for storing files. Every file in Unix has the following attributes
Owner permissions The owner's permissions determine what actions the owner of the file can perform on the file.
Group permissions The group's permissions determine what actions a user, who is a member of the group that a file belongs to, can perform on the file.
Other (world) permissions The permissions for others indicate what action all other users can perform on the file.
Unix-like systems implement three specific permissions that apply to each class:
The read permission grants the ability to read a file. When set for a directory, this permission grants the ability to read the names of files in the directory, but not to find out any further information about them such as contents, file type, size, ownership, permissions.
The write permission grants the ability to modify a file. When set for a directory, this permission grants the ability to modify entries in the directory. This includes creating files, deleting files, and renaming files.
The execute permission grants the ability to execute a file. This permission must be set for executable programs, including shell scripts, in order to allow the operating system to run them. When set for a directory, this permission grants the ability to access file contents and meta-information if its name is known, but not list files inside the directory, unless read is set also.
The effect of setting the permissions on a directory, rather than a file, is one of the most frequently misunderstood file permission issues.When a permission is not set, the corresponding rights are denied.
Hope you find this answer useful.