Re: Práva u mkdir -p -m
Pavel Kankovsky
peak na argo.troja.mff.cuni.cz
Čtvrtek Leden 6 16:04:33 CET 2011
On Thu, 6 Jan 2011, Ladislav Vaiz wrote:
> je v pořádku, aby se mkdir -p -m 0700 aaa/bbb/ccc/ddd
> choval takto?
Ano. Přesně takto to specifikuje IEEE Std 1003.1-2008:
The following options shall be supported:
-m mode
Set the file permission bits of the newly-created directory to the
specified mode value. [...]
-p
Create any missing intermediate pathname components.
For each dir operand that does not name an existing directory, effects
equivalent to those caused by the following command shall occur:
mkdir -p -m $(umask -S),u+wx $(dirname dir) &&
mkdir [-m mode] dir
where the -m mode option represents that option supplied to the
original invocation of mkdir, if any.
Each dir operand that names an existing directory shall be ignored
without error.
Na mezilehlé adresáře se použije umask rozšířený o u+wx, zadané -m až
teprve na koncový.
--
Pavel Kankovsky aka Peak / Jeremiah 9:21 \
"For death is come up into our MS Windows(tm)..." \ 21st century edition /
Další informace o konferenci Linux