[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: |
Enrico Scholz |
Subject: |
bug#14152: [PATCH] build: use 'chmod a-w' instead of 'chmod -w' |
Date: |
Sun, 07 Apr 2013 11:59:52 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
Pádraig Brady <address@hidden> writes:
>>> 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?
These bits can be set due to various reasons; e.g.
$ mkdir /tmp/foo
$ setfacl -m d:m:rwx /tmp/foo
$ umask 022
$ touch /tmp/foo/x
$ chmod -w /tmp/foo/x
chmod: /tmp/foo/x: new permissions are r--rw-r--, not r--r--r--
I use such a setup (posix defaults acls) to build foreign software as a
special user while allowing working on the software (--> editing) as the
normal user.
Enrico