On Fri, 12 Aug 2005 21:45:44 +0200 Holly Bostick <[EMAIL PROTECTED]> wrote: | If umask masks bits off of the 'default' permissions, then what is the | point of umask=000? It seems that it would leave the permissions as | the default, which appear to be 755 (is there a creation mask of 022 | somewhere in the 'default' settings? I can't find it, if so), unless | you've explicitly set them to soemthing else.
umask 'masks' the bits. So umask=000 means "use whatever the application uses when creating things without knocking off any bits". Most system calls that create files or directories also take a parameter for mode, which is where the 755 comes from. For example, for mkdir(2): > int mkdir(const char *pathname, mode_t mode); > (...) > The parameter mode specifies the permissions to use. It is > modified by the process's umask in the usual way: the permissions of > the created directory are (mode & ~umask & 0777). Other mode bits > of the created directory depend on the operating system. For Linux, > see below. -- Ciaran McCreesh : Gentoo Developer (Vim, Shell tools, Fluxbox, Cron) Mail : ciaranm at gentoo.org Web : http://dev.gentoo.org/~ciaranm
pgpqCG9yrUKiV.pgp
Description: PGP signature

