A user issues the Linux command ls -l myfile.sh to check the permission of the file myfile.sh.
[email protected]:~/Documents$ ls -l myfile.sh -rwxr-xr-- 1 self test 15 Mar 30 21:24 myfile.sh
Which two statements describe the permissions assigned to the file? (Choose two.)
- Any user in the self group can read, modify, and execute the file.
- The user with the user ID of self can modify the file.
- The user with the user ID of devasc can modify the file.
- All users can execute the file.
- Any user in the test group can execute the file.
ls -l command provides a “long list” format with more information that includes the following:
File type: The hyphen (-) represents a regular file, the d represents a directory.
File permissions: The first three letters represent the permissions of the file owner over the file, the next three letters represent the permissions of the group over the file, and the last three letters represent the permissions of others over the fie. The permission letters are as follows:
r- read or copy the file
w- write to the file
x- execute the file
hyphen (-) – no value assigned
Number of hard links to the file: 1 in this case
File owner, self in this case
File group: test in this case
File size. 15 bytes in this case
More Questions: DevNet Associate (v1.0) – Module 1 Exam Answers