Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
Hmm...the sticky bit
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Hmm...the sticky bit

  1. #1

    Hmm...the sticky bit

    Hello everyone...

    Well, i'm been trying to track down some information regarding the sticky bit. However, to this point I have been unsuccessful.

    Basically, I understand the basics of it, but i'm still trying to learn the commands. I do not that it works in conjunction with chmod, but i'm trying to learn the values that are associated (kinda like when setting permissions for groups, 755 for example.)

    If anyone would care to increase my knowledge here, please do so. I'm always trying to learn as much as I can.

    Thanks guys.

    Tarballed

  2. #2

    Re:Hmm...the sticky bit

    You can achieve this with the less often used four digit parameter to chmod. ie "chmod n755" where n made up as follows:

    1 = sticky bit
    2 = SGID
    4 = SUID

    So "chmod 1755 filename" will set the sticky bit plus 755 permissions. Alternatively, "chmod +t filename" allows you to set the sticky bit whilst leaving all other permissions in tact ("chmod -t filename" to unset it).

    Type "man chmod" to see a more comprehensive explanation of chmod.

  3. #3

    Re:Hmm...the sticky bit

    Thank you for the update. However, i'm still a bit confused. Maybe I dont quite understand the sticky bit.

    Maybe I need a refresher. Let me get this straight. If I implement a chmod 1755 command, then do a ls -l to view the directory/file and I will see a 't' correct?

    So what am I seeing when I do a ls -l in a directory and I see something like:

    drwxrwsr--

    Whats the S? I thought that was the sticky bit? Boy, I think I was wrong.

    A little help here?

    Thanks guys.

    Tarballed

  4. #4

    Re:Hmm...the sticky bit

    i am not sure - i thought chmod 1### was suiding a program.... ??

  5. #5

    Re:Hmm...the sticky bit

    [quote author=tarballed link=board=1;threadid=4015;start=0#40008 date=1025647156]
    Whats the S? I thought that was the sticky bit? Boy, I think I was wrong.
    [/quote]
    You're not alone there, I thought the same thing when I first encountered permissions ("s" is for "sticky" right?). However, letter s is used for SUID/SGID bits so "t" is for "sticky".
    Sticky bits are normally seen on directories (usually tmp directories). Such a directory may allow full access to all users with the difference that users can only remove files that they own. When set on individual files it means something obscure that I can't remember :P
    The "s" is the SUID (Set User ID) or SGID (Set Group ID) depending on which group of three it is present in. When set on an executable file, it means that file will run with the same access permissions as it's owner or group ID respectively. The most common type you will see in this class are root SUID programs. These allow an unprivileged user to run programs that require root access. These can be a major security flaw (a user may be able to subvert the purpose of such a program) and therefore they should be written with great care. (you may have heard of buffer overflows and the like).

  6. #6

    Re:Hmm...the sticky bit

    [quote author=pbharris link=board=1;threadid=4015;start=0#40011 date=1025647984]
    i am not sure - i thought chmod 1### was suiding a program.... ??
    [/quote]
    AFAIK

    chmod 1### - set sticky bit
    chmod 2### - set SGID bit
    chmod 4### - set SUID bit

    I went and had a look because I was sure I had seen a permissions PET. It turns out to be written by your good self! I am thinking it might be a good idea to have a follow up called something like "Advanced Permissions - Beyond rwx" (maybe not use the word "advanced" as that makes it sound hard). I am thinking it could cover sticky, SG/UID, and touch on device files/pipes/links (so as to explain those other letters).
    I don't mind having a go at it - I'm not sure if my writing talent is up to scratch. What do you think?

  7. #7
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760

    Re:Hmm...the sticky bit

    Go for it. I am always looking the stuff up. I cant remember anything sometimes (drunk stil.....)


  8. #8

    Re:Hmm...the sticky bit

    [quote author=pam link=board=1;threadid=4015;start=0#40077 date=1025696100]
    [quote author=pbharris link=board=1;threadid=4015;start=0#40011 date=1025647984]
    i am not sure - i thought chmod 1### was suiding a program.... ??
    [/quote]
    AFAIK

    chmod 1### - set sticky bit
    chmod 2### - set SGID bit
    chmod 4### - set SUID bit

    I went and had a look because I was sure I had seen a permissions PET. It turns out to be written by your good self! I am thinking it might be a good idea to have a follow up called something like "Advanced Permissions - Beyond rwx" (maybe not use the word "advanced" as that makes it sound hard). I am thinking it could cover sticky, SG/UID, and touch on device files/pipes/links (so as to explain those other letters).
    I don't mind having a go at it - I'm not sure if my writing talent is up to scratch. What do you think?
    [/quote]


    execellent idea sir!!

  9. #9

    Re:Hmm...the sticky bit

    ::Flails::

    Wooow. I sure did stir up the nest here didnt I. No problem though, i'm always eager to learn new things.

    This sounds fantastically complicated, but definetly something I want to learn.

    I was wondering if someone might be able to explain this (I know their is possibly a new PET "advanced permissions" tutorial coming out).

    Briefly, can someone explain to me what the following are and do:

    sticky bit
    SGID bit
    SUID bit

    I had my assumptions that I understood the sticky bit. I was sure wrong.

    Thanks guys for all your input. I look forward to your replies and the future new PET.

    The Tarball

  10. #10

    Re:Hmm...the sticky bit

    Watch this space

    Tarballed, you can be my Guinea^h^h^h^h^h^h^hPeer Reviewer.

Similar Threads

  1. setting sticky bit
    By svar in forum Linux - General Topics
    Replies: 1
    Last Post: 02-01-2011, 12:39 PM
  2. Another sticky request
    By Lovechild in forum Announcements and Suggestions
    Replies: 2
    Last Post: 12-01-2006, 10:37 AM
  3. sticky request
    By Lovechild in forum Announcements and Suggestions
    Replies: 1
    Last Post: 11-25-2006, 04:47 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •