[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in m4/mkdirp.m4
From: |
Eric Blake |
Subject: |
Re: bug in m4/mkdirp.m4 |
Date: |
Mon, 17 Oct 2005 21:45:14 +0000 |
> EB> 'chmod -x install-sh' is not portable.
>
> Thanks for the info. Do you actually know any system where this doesn't work?
Any system with coreutils-5.91 installed, and a umask that
restricts x bits differently than the current x bit setting of
the file:
$ touch file
$ chmod o+x file
$ (umask 001; chmod -x file)
chmod: file: new permissions are rw-r--r-x, not rw-r--r--
$ echo $?
1
The problem is that POSIX only specifies 'chmod -- -x file',
with the weird rule that it is affected by the current umask,
so since 'chmod -x file' is unspecified, coreutils was recently
changed to warn the user that it didn't do what the naive
user expects, while still following the POSIX formula for
which bits are changed.
>
> EB> It is much more portable to do 'chmod a-x install-sh'.
This bypasses the issue altogether by avoiding the
problematic -x.
--
Eric Blake