files recovery after rm?
Jonathan I. Kamens
jik at athena.mit.edu
Mon Nov 13 16:32:40 AEST 1989
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 at unix.cis.pitt.edu> yahoo at 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 at Athena.MIT.EDU Allston, MA 02134
Office: 617-253-8495 Home: 617-782-0710
More information about the Comp.unix.questions
mailing list