X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Mon, 2 Nov 2009 13:19:10 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: mkdir differences between 1.5.25 and 1.7 Message-ID: <20091102121910.GB7831@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20091029083715 DOT GL28753 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Oct 29 14:33, Egerton, Jim wrote: > Test program: > $ cat x.cc > #include > #include > > int main(int argc, char *argv[]) { > mkdir("/tmp/foo", 0777); > } > > $ ls -ld /tmp/foo > ls: cannot access /tmp/foo: No such file or directory > > $ ./x > > $ ls -ld /tmp/foo > drwxr-xr-x 1 root Administrators 0 Oct 29 20:27 /tmp/foo That's a umask thingy. Your umask is probably set to 0022, and per POSIX, mkdir(2) has to take the umask into account. If you use mkdir(1) from coreutils: mkdir -m 777 /tmp/foo it should create the permissions as desired, though, since mkdir(1) sets the umask to 0 if the -m option has been given. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple