Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!netserv2!deven From: deven@rpi.edu (Deven T. Corzine) Newsgroups: gnu.emacs Subject: Re: umask Message-ID: Date: 1 Mar 90 18:38:03 GMT References: <1990Feb28.202706.5878@oracle.com> Distribution: gnu Organization: Rensselaer Polytechnic Institute, Troy, NY Lines: 32 In-Reply-To: nhess@dvlseq.oracle.com's message of 28 Feb 90 20:27:06 GMT armin@nmpcad (Armin Seidel) writes: Armin> I am wondering wether it is possible in emacs to define the Armin> UNIX file creation mode mask. On our Apollo system, emacs Armin> creates and saves files with rw-rw-rw- ignoring the files' Armin> original protection rights and my umask setting. On 28 Feb 90 20:27:06 GMT, nhess@dvlseq.oracle.com (Nate Hess) said: Nate> If you'll look in {...}/src/fileio.c, you'll notice a line or Nate> two that look something like Nate> fd = creat (name, 0666); Nate> You could add code that would replace the 0666 with your current umask, Nate> and then recompile. No! If your umask is 22 (a common default) then this would create files with permissios ----w--w- ... obviously unintended. There should be a umask function (available as a primitive) which simply accepts an argument and calls umask(arg). That creat is just fine. Why there is no umask call is beyond me. (I just scanned the source directories, no sign of one hidden anywhere. *sigh*) Deven -- Deven T. Corzine Internet: deven@rpi.edu, shadow@pawl.rpi.edu Snail: 2151 12th St. Apt. 4, Troy, NY 12180 Phone: (518) 274-0327 Bitnet: deven@rpitsmts, userfxb6@rpitsmts UUCP: uunet!rpi!deven Simple things should be simple and complex things should be possible.