46.9k views
0 votes
Sticky bit can be set using following permission?
1) 777
2) 2666
3) 4744

User Merrie
by
7.8k points

1 Answer

5 votes

Final answer:

The sticky bit, which is part of file permissions in Unix-like operating systems, can be set with the permission code 4744. It is used to restrict file deletion in a directory to the file's owner, directory's owner, or the root user. Permission code 4744 includes the sticky bit along with read, write, and execute permissions for the owner.

Step-by-step explanation:

The answer to the question regarding which permission set includes the sticky bit is option 3) 4744. The sticky bit is a special type of file permission that can be set on directories. It restricts file deletion, such that only the file's owner, the directory's owner, or the root user can delete or rename the files within the directory. To set the sticky bit, you typically use the chmod command with a permission code that includes a '1' in the thousands place (e.g., 1755 or 2744).

For example, 'chmod 4744 filename' sets the permissions of 'filename' to be readable, writable, and executable by the owner (the first '4'), readable by the group (the second '4'), and readable by others (the last '4'), while also setting the sticky bit (the leading '4' in '4744').

User Tvm
by
8.5k points