AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  What is Sticky bit?

    Posted Mon May 21, 2012 03:09 AM

    Originally posted by: shibhikkiran


    Hello all,

    I'm a beginner in AIX, practicing around couple of months.

    When shoot the following command, it shows 't' in the permission field.
    #ls -ld /tmp
    output: drwxrwxrwt (showed first field only)

    I want to know what is the purpose of 't' at the end.
    I know 'r' stands for read, 'w' for write and 'x' for execute.
    Here, I aware of the first 'rwx' sequence is meant for user permission and second 'rwx' sequence is meant for group permission and third sequence is meant for others permission.

    Could anyone of you give me your valuable thoughts?

    Awaiting your response.

    Regrads,
    Kiran
    chennai


  • 2.  Re: What is Sticky bit?

    Posted Mon May 21, 2012 04:40 AM

    Originally posted by: Srikrishan


    When sticky bit is set on a directory only the owner of the file or superuser can delete/rename(delete/change the directory entry) files which are present in that directory.

    As you can see /tmp has rwxrwxrwx which allows every user to create files/dirs in /tmp but this also allows all users to delete files from /tmp which can include files from other users also. when sticky bit is added i.e the permissions are "rrwxrwxrwxt" a non-root user will be restricted to delete/rename the files for which he is the owner.

    -Sri


  • 3.  Re: What is Sticky bit?

    Posted Mon May 21, 2012 04:59 AM

    Originally posted by: shibhikkiran


    Hello sirkrishnan,

    Thank you very much for your quick and valuable response.

    Have a nice day!

    Regards,
    Kiran