Does Sticky Bit works in solaris as per definition

Hi all,

I have trouble working with Sticky bit in solaris,

I am able to delete files and directory from the directory who has sticky bit set , i have verified that i am neither owner of the file pr directories..

I have check in Solaris 7, 8 ,9 ,10, versions, that does not seem to work..

I have a Linux redhat Entertprise machine as well, The Sticky bit works very well as per definition..

Can any one please help in this matter..

what is purpose of haveing sticky bit in solaris..

Regards
Kshama
TCS

It works fine for me on Solaris 8, 9, 10 and nevada.

Wikipedia has a vague reference: "Solaris appears to have abandoned this in 2005".

Sticky bit - Wikipedia, the free encyclopedia

If you have definitive proof for a range of Solaris versions it must be tempting to update Wikipedia for the benefit of all.

Please post
ls -lad <directory>

Please tell me what am I doing incorrectlly?

-bash-3.00$ uname -a
SunOS SOLARIS-TEST-01 5.10 Generic_127127-11 sun4u sparc SUNW,Sun-Blade-100
-bash-3.00$ pwd
/export/home/shankk/testdir
-bash-3.00$ id
uid=8235(shankk) gid=0(root)
-bash-3.00$ ls -al
total 4
drwxrwxrwt   2 shankk   other        512 Jan  8 10:11 .
drwxr-xr-x   7 shankk   root         512 Jan  8 22:14 ..
-rw-r--rw-   1 shankk   other          0 Jan  6 11:23 8
-bash-3.00$ su test
Password:
bash-3.00$ id
uid=100(test) gid=1(other)
bash-3.00$ ls -al
total 4
drwxrwxrwt   2 shankk   other        512 Jan  8 10:11 .
drwxr-xr-x   7 shankk   root         512 Jan  8 22:14 ..
-rw-rw-rw-   1 shankk   other          0 Jan  6 11:23 8
bash-3.00$ rm 8
bash-3.00$ ls -al
total 4
drwxrwxrwt   2 shankk   other        512 Jan 17 18:25 .
drwxr-xr-x   7 shankk   root         512 Jan  8 22:14 ..
bash-3.00$

The file "8" got deleted.. even the sticky bit was set and test was not owner of the file and current directory..

If a directory is writable and has sticky bit is set, files within directory removed or renamed only if one or more following is true:

    - The user owns the file

    - The user owns the directory

    - The file writable by the User

    - The user is "root"

chmod 1777 project_dir

http://snap.nlc.dcccd.edu/reference/sysadmin/julian/ch18/402-404.html

The sticky bit is displayed as the letter t in the execute field for 'others'.

thank you mate..

I have got the concept from ur comment..

The 1777 directory should be owned by "root" in a privileged group such as "sys".
In your case the directory is owned by a normal user in group "other". Normal directory permissions apply.

Actually, the sticky bit works even in cases where the directory isn't owned by root. What matters here are the files write permissions to the user.