The install command has a bug, but I don’t know where to report it.
install -m 700 -d one/two/three
Only three will have the requested permissions set; the previous components, even if generated by the command, will have default permissions. While it makes sense to not modify permissions on existing components of the path, not setting it on newly created ones except the last one is completely nonsensical!
On 2015-05-06 07:16, Prune wrote:
>
> The install command has a bug, but I don’t know where to report it.
If it were an openSUSE issue, in openSUSE’s bugzilla.
In this case, upstream, I’d guess.
> install -m 700 -d one/two/three
>
> Only three will have the requested permissions set; the previous
> components, even if generated by the command, will have default
> permissions. While it makes sense to not modify permissions on existing
> components of the path, not setting it on newly created ones except the
> last one is completely nonsensical!
IMO, the correct approach would be to create each directory in a
separate command, specifying the permissions and ownership on each. Not
create the three elements in one shot.
And of course, better read the documentation before you file a bug.
From info coreutils ‘install invocation’
* If the `--directory' (`-d') option is given, `install' creates
each DIRECTORY and any missing parent directories. Parent
directories are created with mode `u=rwx,go=rx' (755), regardless
of the `-m' option or the current umask. Directory Setuid
and Setgid, for how the set-user-ID and set-group-ID bits of
parent directories are inherited.
The install command has a bug, but I don’t know where to report it.
install -m 700 -d one/two/three
Only three will have the requested permissions set; the previous
components, even if generated by the command, will have default
permissions. While it makes sense to not modify permissions on existing
components of the path, not setting it on newly created ones except the
last one is completely nonsensical!
Hi
In rpm specs I use;
install -Dm0700 /one/two/three
–
Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.39-47-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
If the --directory' (-d’) option is given, install' creates each DIRECTORY and any missing parent directories. Parent directories are created with mode u=rwx,go=rx’ (755), regardless
of the `-m’ option or the current umask. *Note Directory Setuid
and Setgid::, for how the set-user-ID and set-group-ID bits of
parent directories are inherited.