on Thu, Nov 21, 2002 at 08:59:23AM -0000, Ricardo Campos wrote:
but then you will need mode 777 or 1777.
None of my books explain the difference between 0777 and 1777. What's the significance of the 1?
it's the sticky bit. under modern unices, when this bit is applied to a directory, it has a special meaning.
from sticky(8): STICKY DIRECTORIES A directory whose `sticky bit' is set becomes an append-only directory, or, more accurately, a directory in which the deletion of files is re- stricted. A file in a sticky directory may only be removed or renamed by a user if the user has write permission for the directory and the user is the owner of the file, the owner of the directory, or the super-user. This feature is usefully applied to directories such as /tmp which must be publicly writable but should deny users the license to arbitrarily delete or rename each others' files.
applied to files, it indicates which executable files are shareable and causes parts of the text segment to be stored in swap when needed. this is now the default, so its usage in this context is pretty much redundant.
generally, when you make a directory world-writable, you want it sticky too. you may also want to look at the use of a setgid directory under linux, as this forces the group ownership of files to the group of the directory. (or did last time i tried.)