[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fw: Fuck the script... I want him gone now....



On Thu, 30 Oct 1997, Kevin Traas wrote:

: Can anyone tell me what the following permission means?
: 
: >drwx-----T   2 bong      admin        1024 Oct 29 21:27 private
: 
: 
: Thanks,
: Kevin

I like the subject :)  I felt that way about users yesterday ...

I created a directory with the same permissions:
kepler:~ $ mkdir test
kepler:~ $ /bin/ls -ldF test
drwxr-s---   2 nnorman  nnorman      1024 Oct 30 11:20 test/
kepler:~ $ chmod 1700 test
kepler:~ $ /bin/ls -ldF test
drwx-----T   2 nnorman  nnorman      1024 Oct 30 11:20 test/

So, it's a directory, accessible only by the owner, who can also
create/delete files there.  The "sticky" bit is also set (which in this
case doesn't do much at all)

However, the sticky bit is useful - consider the /tmp directory:
kepler:~ $ whoami
nnorman
kepler:~ $ /bin/ls -ldF /tmp
drwxrwxrwt   3 root     root         1024 Oct 30 11:25 /tmp/
kepler:~ $ /bin/ls -lF /tmp
total 44
drwxr-xr-x   2 root     root        12288 Sep 25 18:17 lost+found/
-rw-r-----   1 root     root            0 Oct 30 11:25 try_to_delete_me
-rw-r--r--   1 nnorman  nnorman     31453 Oct 28 14:26 zman03143aaa
kepler:~ $ rm /tmp/try_to_delete_me 
rm: remove `/tmp/try_to_delete_me', overriding mode 0640? y
rm: /tmp/try_to_delete_me: Operation not permitted

Although I can write to /tmp, which normally means I can delete any file
within /tmp no matter who owns it, the sticky bit prevents me from
deleting a file I don't own.

If you already knew that sticky bit stuff, sorry :)

--
Nathan Norman
MidcoNet - 410 South Phillips Avenue - Sioux Falls, SD  57104
Voice: (605) 334-4454 Fax: (605) 335-1173
email: nnorman@midco.net or  nathan_norman@mmi.net
PGP Key ID: 0xA33B86E9 - Public key available at keyservers  
PGP Key fingerprint: CE03 10AF 3281 1858  9D32 C2AB 936D C472


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: