Answers
What is an ACL? -
✔️An ACL is a list of rules that specifies which users or systems are granted or denied access to a
particular object or system resource. They are used to control permissions.
What is an access matrix? -
✔️An access matrix is a conceptual model that specifies the rights that each subject possesses for
each object. The privilege is listed in each cell.
What does the command chmod do? -
✔️Change mode. It modifies the permissions of a given file.
What is SUID? -
✔️Set user ID. The user who executes the file becomes the owner of the file during the execution.
What does the command getfacl do? -
✔️Get file ACL. This command lists all ACL entries for a particular file or directory. Check the current
state of the ACL.
What does the command setfacl do? -
✔️Set file ACL. This command is used to modify ACL entries for a particular file or directory.
What is SGID? -
✔️Set group ID. If set of a file, the user who executes the file becomes a member of the file's group,
regardless of whether the user who runs it is in that group or not. If set on a directory, it causes the
files created within the directory to have the same group as the directory. This is useful for
directories shared by multiple users with different groups.
What is a sticky bit? -
,✔️A sticky bit is a permission bit that is set on a file or directory that lets only the owner of that file
or directory rename, move, or delete it.
What does the command umask do? -
✔️This is a special variable that alters the permissions on all new files and directories by taking
away select default file and directory permissions.
What does the read permission allow? -
✔️Allows a user to open and read the contents of a file. Allows a user to list all the content of the
directory (if they have been given execute permission).
What does the write permission allow? -
✔️Allows a user to open, read, and edit the contents of a file. Allows a user to add or remove files
to and from the directory (if they have been given execute permission).
What does the execute permission allow? -
✔️Allows a user to execute the file in memory. Allows a user to enter the directory and work with
the directory contents.
What is the default chmod number for new directories? -
✔️755 (rwxrw-r-xr-x)
What is the default chmod number for new files? -
✔️644 (rw-r--r--)
What is the default umask value for root? -
✔️022
File: 644 (rw-r--r--)
Directory: 755 (rwxrw-r-xr-x)
Write a command to use an ACL to deny all access to a file for a user Masood. -
✔️setfacl -m u:masood:000 file.txt
, Write a command to use an ACL to allow write and execute permissions to a file for a user Masood. -
✔️setfacl -m u:masood:wx file.txt
Write a command to add a user Masood to the group cybr371. -
✔️groupadd cybr371
useradd -m -g masood -s /bin/bash cybr371
What is the numerical representation of rwxrwsr-t? -
✔️3775
What is the numerical representation of r-sr-Sr-x? -
✔️6545
What is the numerical representation of r-sr-x--x? -
✔️4551
If the umask value for a user is 035, what are the default file and directory permissions set for the
user? -
✔️File: 666 - 035 = 631 (rw-x-wx--x)
Directory: 777 - 035 = 742 (rwxr---w-)
If the default permission for a file for a user is r-xr--r--, what are the default permissions for the
directories for the user? -
✔️r-xr--r-- = 544
umask: 666 - 544 = 122
Directory: 777 - 122 = 655 (rw-r-xr-x)
What is promiscuous mode? -
✔️Promiscuous mode can be set on a NIC card to tell it to accept all packets irrespective of what is
specified by the destination MAC address.
What is IP forward field? -