[Top][All Lists]

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

Re: chmod (GNU fileutils) 4.0.35

From: Bob Proulx
Subject: Re: chmod (GNU fileutils) 4.0.35
Date: Thu, 22 May 2003 09:01:15 -0600
User-agent: Mutt/1.3.28i

David van Gorkom wrote:
> chmod +w file
> or
> chmod -w file
> this has only effect on the write bit of the user - not to all
> (i.e. group and others are not affected) (whereas +r,-r and +x,-x
> are working as expected and set the permission for all)

Thanks for the report.  But I believe you are seeing the effect of
your umask setting on this behavior.  What does this say?


This is documented in the info pages.  Look for File permissions,
Symbolic Modes, Umask and Protection.

    The Umask and Protection

       If the USERS part of a symbolic mode is omitted, it defaults to
    `a' (affect all users), except that any permissions that are _set_
    in the system variable `umask' are _not affected_.  The value of
    `umask' can be set using the `umask' command.  Its default value
    varies from system to system.

       Omitting the USERS part of a symbolic mode is generally not
    useful with operations other than `+'.  It is useful with `+'
    because it allows you to use `umask' as an easily customizable
    protection against giving away more permission to files than you
    intended to.

       As an example, if `umask' has the value 2, which removes write
    permission for users who are not in the file's group, then the mode:


    adds permission to write to the file to its owner and to other
    users who are in the file's group, but _not_ to other users.  In
    contrast, the mode:


    ignores `umask', and _does_ give write permission for the file to all

You might want to reference the online standards specification for
chmod behavior.


Hope this helps,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]