1822591 Members
3803 Online
109643 Solutions
New Discussion юеВ

Re: sticky bit

 
SOLVED
Go to solution
N.D
Occasional Advisor

sticky bit

Need to change file permissions from:

drwxrwSr-x 2 test test 96 Mar 4 2004 test

to

drwxrwsr-x
7 REPLIES 7
Ravi_8
Honored Contributor
Solution

Re: sticky bit

Hi

#chmod g+s test
never give up
Bharat Katkar
Honored Contributor

Re: sticky bit

Hi,
By the way, "S" is not a sticky, sticky bit is repesented by "t" in the permissions field of a file.
Regards,
You need to know a lot to actually know how little you know
Ravi_8
Honored Contributor

Re: sticky bit

Hi

"t" comes only if file is linked
never give up
Thierry Poels_1
Honored Contributor

Re: sticky bit

correct,

S in first rwS is SETUID, small "s" if execute permission is not granted
S in second rwS is SETGID, small "s" if execute permission is not granted
t in last rwt is sticky bit

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Muthukumar_5
Honored Contributor

Re: sticky bit

You can know sticky bit informations there in chmod man page.

4000 (= u=s) Set user ID on file execution (file only)
2000 (= g=s) Set group ID on file execution (file only)
1000 (= u=t) Set sticky bit

To change to stikcy bit use as,

chmod 1775 test

We are using sticky bit so that,

specific file can be renamed / deleted by that owner there.

Regards
Muthu.
Easy to suggest when don't know about the problem!
Jeff_Traigle
Honored Contributor

Re: sticky bit

Slight correction to Theirry's statements... S and T are displayed if the corresponding execute bit isn't set. s and t display if the corresponding execute bit is set.
--
Jeff Traigle
Thierry Poels_1
Honored Contributor

Re: sticky bit

aaaaargghh,

I stand corrected. It seems I mixed things up :(

rw- + chmod u+s = rwS
rwx + chmod u+s = rws

sorry

can someone assign negative points to me ;-)
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.