From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,65a8115b1650088 X-Google-Attributes: gidf678f,public X-Google-Thread: fee84,65a8115b1650088 X-Google-Attributes: gidfee84,public From: fenster@zk3.dec.com (Yaacov Fenster) Subject: Re: How to set correct mode using mkdir(2) in C? Date: 1996/07/08 Message-ID: <4rrn53$k89@nntpd.lkg.dec.com>#1/1 X-Deja-AN: 167237144 distribution: world references: <4re9nl$eb1@news.internetmci.com> organization: Digital Equipment Corporation reply-to: fenster@zk3.dec.com newsgroups: comp.unix.osf.osf1,comp.unix.osf.misc In article <4re9nl$eb1@news.internetmci.com> dyuan@win20.rch.mci.com (David Yuan) wrote: > ------------------------------------------- > char mydir[] = "/tmp/data"; > mode_t mode = S_IRWXU | S_IRWXG; > mkdir (mydir, mode); > ------------------------------------------- > > but the result is: > > drwxr-x--- 2 dyuan system 512 Jul 3 12:03 /tmp/data/ > > The group is not writable. > I also try to use umask (2) without luck. I just now tried it after doing a umask(0) first (On both V3.2C and V4.0), and I had no problem at all. Could you please post a full snippet of code showing the problem ? Yaacov