procmail
[Top] [All Lists]

Re: Procmail lock

2005-09-25 09:56:29
Cerebus the Aardvark <gkreme(_at_)gmail(_dot_)com> wrote:

[...]

% man 8 sticky
A special file mode, called the sticky bit (mode S_ISVTX), is used to
indicate special treatment for shareable executable files and directo-
ries.  See chmod(2) or the file /usr/include/sys/stat.h for an explana-
tion of file modes.

Hmm...interesting, I don't seem to have the same set of man pages.  For
example, this last page is entirely missing from my system, and `man
chmod' doesn't have the section named "MODES" as you showed.  I'm using
Debian unstable.


In short, you can create a directory with mode 1777 which looks like
it is a wide open directory where chaos reigns and anyone can delete
anything.  But since the sticky bit is set, when I create a file in
the directory and set it's permissions to 600, those permissions
basically override the permissions of the directory.  Since the file
is only readable/writeable by me, no one else can look at it, delete
it, or modify it. the 777 permissions on the directory allow me to
create a file, but don't allow anyone else to mung it.

Thanks, that's very helpful.  So if I understand correctly, I need to set
/var/mail's mode to 1777 *and* set my user file's mode to 600?  That means
it's not convenient to delete the file once all my messages have been
passed on to my MUA, because I'd have to create the file again and set it
to 600 every time.  Is this true?


Cheers,

-- 
Sebastian P. Luque


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>