bug-coreutils
[Top][All Lists]
Advanced

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

bug#14152: [PATCH] build: use 'chmod a-w' instead of 'chmod -w'


From: Bob Proulx
Subject: bug#14152: [PATCH] build: use 'chmod a-w' instead of 'chmod -w'
Date: Sat, 6 Apr 2013 16:27:35 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Pádraig Brady wrote:
> > -     && chmod -w address@hidden                                            
> > \
> > +     && chmod a-w address@hidden                                           
> > \
> 
> I'll apply that fix.

I think it is always a good idea to use 'a' when there isn't any other
specific reason to do anything different.  Or put the reverse way,
whenever I see a naken "-[rwx]" then I am suspicious of the action.
Because it masks with umask and is almost never what is desired.

> What system does the build fail on as a matter of interest.

This will occur on any system that has umask set to 022.  Here is an example:

  $ umask 022
  $ touch foo
  $ chmod ug+w foo
  $ chmod -w foo
  chmod: foo: new permissions are r--rw-r--, not r--r--r--
  $ echo $?
  1

Bob





reply via email to

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