Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!mouse From: mouse@thunder.mcrcim.mcgill.edu (der Mouse) Newsgroups: comp.unix.questions,comp.unix.programmers Subject: Re: Permission at the time of file creation Message-ID: <1991Jun22.165017.1644@thunder.mcrcim.mcgill.edu> Date: 22 Jun 91 16:50:17 GMT References: <1991Jun21.201632.2407@menudo.uh.edu> Distribution: usa Organization: McGill Research Centre for Intelligent Machines Lines: 20 In article <1991Jun21.201632.2407@menudo.uh.edu>, rmdubash@hermes.cs.uh.edu writes: > I am using SunOS4.1.1 and trying to open a file using the open system > call with a mode value 777. Although my umask is 0, the file created > has quite arbitrary permissions Arbitrary? Are they by any chance r----x--x? > Any clue as to what am I missing? If the bits *are* r----x--x, you're forgetting that the mode is generally written in octal, or else you're forgetting that octal isn't the default base for numbers in C. Try giving the mode value as 0777 instead of 777 and see if it doesn't help. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu