Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!uunet!munnari.oz.au!cs.mu.oz.au!ok From: ok@cs.mu.oz.au (Richard O'Keefe) Newsgroups: comp.unix.questions Subject: Re: files recovery after rm? Message-ID: <2696@munnari.oz.au> Date: 13 Nov 89 06:41:27 GMT References: <16608@uhnix1.uh.edu> <20530@unix.cis.pitt.edu> <15844@bloom-beacon.MIT.EDU> Sender: news@cs.mu.oz.au Lines: 15 In article <15844@bloom-beacon.MIT.EDU>, jik@athena.mit.edu (Jonathan I. Kamens) flames at Moore: > As has already been pointed out to you, setting your umask to 077 > will cause all files created by you to have permissions ---rw-rw- or > ---rwxrwx. Meaning that you can't read them or execute them. The thing about umask is that it is the COMPLEMENT of a mask, the bits which are ON in the umask are the permissions which are to be DENIED. So if you create a file with mode 0 when your umask is 0<0><7><7> the <0> leaves the permissions alone and the <7>s clear the and permissions, making the result 0<0><0>. For example, if I do creat("foo", 0666) when my umask is 0077 what I get is 0600, or rw-------. I'm afraid Sro Kamens has it backwards.