[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: |
Pádraig Brady |
Subject: |
bug#14152: [PATCH] build: use 'chmod a-w' instead of 'chmod -w' |
Date: |
Sun, 07 Apr 2013 02:19:25 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 04/06/2013 11:27 PM, Bob Proulx wrote:
> 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
But if the umask is 022, then those write bits shouldn't be set anyway?
You're forcing g+w above.
thanks,
Pádraig.