bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fileutils] mkdir problem


From: Eric Blake
Subject: Re: [fileutils] mkdir problem
Date: Wed, 12 Apr 2006 03:40:30 +0000

> I'm using fileutils 5.2.1. 

That version is somewhat old.  Consider upgrading to the latest stable
version, 5.94: 
http://lists.gnu.org/archive/html/bug-coreutils/2006-02/msg00078.html

> Issuing
> 
>       mkdir -m 755 -p /foo/bar
> 
> When neither foo nor bar exist, mkdir puts filemode of bar to be 755 but 
> foo will be 700. The man page says of -m:
> 
>        -m mode, --mode=mode
>               Set  the  mode of created directories to mode, which may be sym-
>               bolic as in chmod(1) and then uses the default mode as the point
>               of departure.
> 
> which means that all created directories should have mode 755, but only 
> the leaf directory will have that mode.

Thanks for the report.  However, what is your umask?  The info pages also
state (and POSIX requires) that intermediate directories created by mkdir -p
be given permissions according to the current umask modified by u+wx.  In
other words, this is probably not a bug in mkdir, but a case of restrictive
umask settings.

-- 
Eric Blake




reply via email to

[Prev in Thread] Current Thread [Next in Thread]