• Create a file and change its permissions so that owner can only read the file and the respective group can read/write the file while other can read/write/execute the file using octal values
Ans. $ chmod 467 file_name

• Change the permissions of the file so that user can read/write/execute the file, group can read/execute the file and others can only read the file without using octal values
Ans. $ chmod u=rwx,g=rx,o=r file_name

• Create a new user “Lab_user” and change the ownership of the file to this new user
Ans. $ sudo useradd lab_user
$ sudo chown lab_user file_name

• Create a new group “Lab_users” and assign this group to the file
Ans. $ sudo groupadd lab_users
$ sudo chgrp lab_users file_name

• Change the default permissions to rwx rw- r--
Ans. $ umask 013

• Create directory so that only the owner or root can delete the directory
Ans. $ mkdir test
$ chmod o+t test or or $ chmod 100 test

• Create a file so that when it is executed, the group ID of the process is changed to the group ID of the file
Ans. $ mkdir directory_name
$ sudo chown lab_user directory_name

Set up ACLs
• As root, create a dir ‘acl_test’ in /tmp and set its permission as 700
Ans. $ sudo mkdir /tmp/acl_test
$ sudo chmod 700 /tmp/acl_test

• As username, try to change into this dir
Ans. "you do not have permissions necessary to open the file"