Lesson 1

Date: 1/18/2017
User accounts, files and directories, processes, system commands.
Linux System Administration


Sticky bit

  • Sticky bit on a directory protects files in the directory from been modified/removed by non their owners.

  • For example /tmp directory on a Unix/Linux system has a sticky bit set
    ls -ld /tmp
    drwxrwxrwt 4 root root 4096 2008-07-25 16:29 /tmp
    

    Exercise
    Open a new shell and become root:
    xterm &
    sudo -s
    
    Create a new directory, temp, and give it a world writable permissions
    mkdir temp
    chmod 777 temp
    
    In the directory, user root creates a new empty file:
    cd temp
    touch ex3
    
    Try removing this file in the other, non-root, shell:
    cd temp
    rm ex3
    

    Again, as user root
    chmod 1777 temp
    
    Then repeat the steps above with creating and removing file ex3 in directory temp


  • Take me to the Course Website