Command to change ownership of file for a group
$ chgrp
In Linux, a file also refers to a __________.
directory
A directory is a file with associative relationships.
What are the three levels of permissions for files in Linux?
These permissions determine what actions users can perform on files and directories.
The Read permission allows a user to __________.
see the contents of the file
For directories, it allows seeing the list of files.
The Write permission allows a user to __________.
modify the contents of the file
For directories, it allows creating or deleting files.
The Execute permission allows a user to __________.
run the file like a command
For directories, it allows the user to go inside the directory.
To view detailed information about a directory, use the command: __________.
$ ls -ld
This command shows the permissions and ownership of the directory.
In Linux, each file has three owners: User, Group, and __________.
Others
This categorization helps manage file permissions.
The command to change permissions of a file is __________.
chmod <option> <filename></filename></option>
Options can be symbolic or octal.
What does the command ‘chmod u+x box’ do?
Adds execute permission for the user on the file ‘box’
This is an example of a symbolic permission change.
The octal value for read, write, and execute permissions is __________.
4 for read, 2 for write, 1 for execute
These values are used to calculate permissions in octal format.
To change the user owner of a file, the command is __________.
chown <username> <filename></filename></username>
This command changes the ownership of the specified file.
True or false: Changing ownership of a directory automatically changes the ownership of its contents.
FALSE
To change contents and subdirectories, use the recursive option: -R.
The default file permissions for newly created files are typically represented as __________.
r w - r - - r - -
This indicates the default permissions for user, group, and others.
The command to change the default mask for file permissions is __________.
umask <value></value>
This command sets the default permissions for newly created files.
What does the special permission ‘sticky’ do?
Users can only delete or change files they own
This applies even if they have write permissions via group or other.
To add a sticky bit to a directory, the command is __________.
chmod o+t <directory></directory>
This prevents users from deleting files they do not own.