Linux Sysadmin Test Prep

Permissions

Permissions

Files

chmod

  • u+s (SUID)
  • g+s (SGID)
  • +t (Sticky)

chattr

  • append only (a)
  • compressed (c)
  • no copy on write (C)
  • immutable (i)
  • secure deletion (s)

Create and execute a script /danielsTestDrills/perms/perms.sh which sources the file /danielsTestDrills/perms/vars sets: $var0 with fully permissive read, write, and execute permissions. $var1 as owned by user toto and group oz $var2 with a sticky bit $var3 as suid $var4 as sgid $var5 with an ACL giving write permissions to toto $var6 as immutable $var7 as append only and echos "var# FAILED!" (eg. var7 FAILED!) in case of failure (hint: only one will fail if you do it right)


Search for files with the sticky bit set and change the name to sticky.

Search for files with the setgid permissions set and change the name to setGID.

Search for files with the setuid permissions set and change the name to setUID.

Search for all files executable by anyone and delete them.

Search all files readable by anyone and remove those permissions.

Search for the file with toto's ACL write permissions and append the filename into /danielsTestDrills/tempFile


Remove /danielsTestDrills/tempFile

Edit this page on GitHub

On this page