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

Re: Sticky bit on device files?

On Tue, Feb 14, 2012 at 07:39, Peter Lebbing <peter@digitalbrains.com> wrote:
> Hello all,
> Since some time I get the message
>> swapon: [...]: insecure permissions 1660, 0660 suggested.
> [1] is related to this. I'm not worried, but there are two things I wonder:
> 1) Foremost, what does the sticky bit on character or block device files even
> _mean_? I'm guessing it's meaningless, but I wonder. My Google fu comes up
> empty. <paranoid mode> It's a big cover up? </paranoid mode> ;P

POSIX does not specify a behavior for the S_ISVTX bit being set on a
file: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/chmod.html

It seems that Linux ignores it on files (not true on HP-UX and Solaris).
Device files don't seem to be any different in that regard.

But I admit I don't know for sure.

> 2) How come the sticky bit is set for a whole bunch of character and block
> devices? Grepping through udev rules didn't shed light on it. I didn't feel like
> reading all rules manually, hoping somebody already knows.

Sounds odd. I don't have access to my Debian box right now, but I don't
really remember seeing any sticky bits in there. There is an OpenSuSE
box here, it has sticky bit on /dev/shm, but that is it.

Kelly Clowers

Reply to: