Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!purdue!tut.cis.ohio-state.edu!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.questions Subject: Re: files recovery after rm? Message-ID: <15844@bloom-beacon.MIT.EDU> Date: 13 Nov 89 05:32:40 GMT References: <16608@uhnix1.uh.edu> <20530@unix.cis.pitt.edu> <1989Nov9.162314.4713@virtech.uucp> <20551@unix.cis.pitt.edu> <1989Nov10.012648.8942@rpi.edu> <20559@unix.cis.pitt.edu> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Organization: Massachusetts Institute of Technology Lines: 80 Mr. Moore, I don't usually criticize people on the net, but I find it necessary to do so in this case. You've been grated on my nerves for just long enough now that I find it necessary to respond. You have a lot of nerve talking pedantically to someone who obviously is more informed than you are. You have shown to the net, and to comp.unix.questions in particular, ignorance about several relatively basic subjects in the past couple of weeks. That would not be so bad if you were *asking* questions, but you are *answering* them, and giving wrong answers in the process. When people do correct you, you have taken the position that you must know more than they do, even when you obviously do not. Your attempt to dismiss your .signature garbage as a minor problem, when the rest of the net continues to tell you that is not, is one good example of this. In article <20559@unix.cis.pitt.edu> yahoo@unix.cis.pitt.edu (Kenneth L Moore) writes: >You are confusing umask with the actual mask. I set my mask to 111 000 000 >by using a umask of 077 in my .cshrc. He is confusing nothing. Mask and umask are identical terms in this situation. Do you even understand why it is *called* a mask? If you did, you would not have posted this message, because the name *implies* the meaning. It is called a mask because the following process happens whenever a file is created: 1. Somewhere in the process of creating the file, the open() function is called. This function takes as one of its arguments the desired access modes for the file. 2. The requested access modes are MASKED by the process' UMASK value. That is, a BITwise AND is performed, and anything left over is the permissions that actually get assigned to the newly created file. >Here is how it works: Gee, thanks for the lesson. >The first bit in the first word (pertaining to my privileges) is logically >anded with 1 giving me read privileges. The second bit is anded with >a 1 giving me write privileges. The third bit is anded with 1 to give me >execute privileges. Actually, the whole umask is masked over the requested permissions when a file is created using a bitwise AND, not a logical AND. I'm not sure what you're saying here -- are you saying that your umask is used to determine whether you are allowed to read a file that is already created, by AND'ing your mask with the permissions on the file? That's completely wrong. Umask only applies during file creation. >If you and a zero with something it becomes a zero. That is what happens >in the second two fields. This means that others have no read, write or >execute privileges. Gee, thanks for telling us how AND works. >If you need more info, please email as this is a very basic question. Yes, one which you obviously have gotten wrong. 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. I doubt that's really what's happening, unless you do very strange things with your account. Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8495 Home: 617-782-0710