David Guntner wrote:
> 
> Tom Walsh grabbed a keyboard and wrote:
> >
> > I assume that the sticky bit is necessary on /tmp?  Why does /tmp have
> > to be sticky?  How can I set the sticky on that volume?
> 
> Not sure about the answer to your third question.  In theory, once you've
> set it, it should stay set - I don't know why it wouldn't still be set
> after a reboot.  But as to your first/second question, setting /tmp sticky
> is really only important if you've got more than one user for your machine.
> If you're the only one using it, it doesn't matter because you know if you
> can trust yourself. :-)  The sticky bit is important on a world-writable
> directory when you've got multiple users for your machine, because with the
> sticky bit set, only root and the user who created a file in that directory
> can delete it.  (Deletion is a function of directory permissions, not file
> permissions.)

Hi Dave,

Yes, I kind of figured that out that the sticky would make it possible
to only allow the user of an opened file to be seeing only their changes
to the file, regardless if someone else attempts to change it.

As to the sticky bit, I have evidence that the mode bits are stored
someplace within the volume (superblock?).  I had an experience when I
made the /var directory too small on one installation and attempted to
simply swap the mount points of the /tmp & /var partitions.  The sticky
bit showed up on the /var directory when I mounted the old /tmp
partition to that new mounting point.

It is somewhere in the filesystem that this attribute is specified and
it would have to be mount that sees this mode bit.  I have searched the
/sbin, /usr/local/sbin and /usr/sbin directories and pulled up the
manpages on the commands that I was not familiar with, but nothing I can
find mentions any mount options embedded in the superblock.

It looks like I will have to get the sources to the mount command and
check in there, but, the kernel is also instrumental in mounting
volumes.  All that mount does is co-ordinate the mounting efforts of the
kernal calls to sys_mount..



Regards,

TomW

-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------------------------------------------

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to