Does Sticky Bit works in solaris as per definition


 
Thread Tools Search this Thread
Operating Systems Solaris Does Sticky Bit works in solaris as per definition
# 1  
Old 01-17-2009
Network 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
# 2  
Old 01-17-2009
It works fine for me on Solaris 8, 9, 10 and nevada.
# 3  
Old 01-17-2009
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.
# 4  
Old 01-17-2009
Please post
ls -lad <directory>
# 5  
Old 01-17-2009
Quote:
Originally Posted by reborg
It works fine for me on Solaris 8, 9, 10 and nevada.
Please tell me what am I doing incorrectlly?

Code:
-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..

Last edited by DukeNuke2; 01-17-2009 at 02:48 PM..
# 6  
Old 01-17-2009
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/...8/402-404.html

The sticky bit is displayed as the letter t in the execute field for 'others'.
# 7  
Old 01-17-2009
Quote:
Originally Posted by incredible
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

Solaris Advanced System Administrator's Guide, Second Edition:Understanding System Security

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..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Solaris sticky bit

i got this archive file on sticky bit mode. somehow i could not remove the sticky bit. i could not even copy or view the view using file user account or root account. -rw-r--r-T 1 mark support 875166720 Mar 23 2005 file_mig.dat anybody encounter this type of problem? i have done running... (11 Replies)
Discussion started by: uwagon
11 Replies

2. AIX

sticky bit

as far as i understand, if sticky bit is set on a directory, the files created under tht directory cannot be deleted by ordinary user... but we can do ths by permission itself,,, tht's assign only read permission to tht dirrectory wht 's the difference? (1 Reply)
Discussion started by: udtyuvaraj
1 Replies

3. AIX

Sticky Bit

What is sticky bit ...and where we aill use this.. how to set this bit in files and directories (1 Reply)
Discussion started by: udtyuvaraj
1 Replies

4. Shell Programming and Scripting

Sticky Bit

I want a file I create to not be deletable by other users so I created a sticky bit by chmod 1644 on the file. chown'd it to root and then tried to delete (via GUI drag to trash and empty) as a non root user and it let me. is sticky bit only good for terminal deletes or something? (4 Replies)
Discussion started by: glev2005
4 Replies

5. UNIX for Dummies Questions & Answers

Sticky Bit????

HI What is sticky bit? how can be see if the sticky bit for file is set? WHat is meaning of sticky bit set on Directory? What is the syntax to set the sticky bit? With example Thanks (10 Replies)
Discussion started by: skyineyes
10 Replies

6. UNIX for Dummies Questions & Answers

Question regarding permision and seguid bit (sticky bit)

Hi , I am having file permision as drwxrwsr_x I kwo for deleting a file in the diretory i need w permsion as well .. Say if i am having the permsion as drwxrwsrwx - wil any one can delete the files in the directory .. And one more question what is the s doing there ..... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies

7. UNIX for Dummies Questions & Answers

Sticky Bit

Hi, could anyone please send me a link to learn/ know more about sticky bits? I am still not clear on the application of using a sticky bits. Thanks for your help. Regards, UP (3 Replies)
Discussion started by: teenu18
3 Replies

8. Shell Programming and Scripting

sticky bit

Hi frns, What is command to list out all dir's for which sticky bit has been set. Regards, Manu (2 Replies)
Discussion started by: manu.vmr
2 Replies

9. UNIX for Dummies Questions & Answers

sticky bit

What command string would you use to set the sticky bit on a directory that you own? (2 Replies)
Discussion started by: mma_buc_98
2 Replies

10. UNIX for Dummies Questions & Answers

Sticky bit

I have a questions, whose answer may be very obvious: Of what use is the sticky-bit permission on a Unix system? I have looked at the chmod(1) man page on our HP-UX playground system, and haven't been given much explanation: Add or delete the save-text-image-on-file- execution (sticky... (3 Replies)
Discussion started by: LivinFree
3 Replies
Login or Register to Ask a Question