[315] in Info-AFS_Redistribution
Question regarding permissions
daemon@ATHENA.MIT.EDU (Neil Weisenfeld)
Thu Sep 19 18:41:19 1991
From: Neil Weisenfeld <weisen@alw.nih.gov>
To: info-afs@transarc.com (Info-AFS Mailing List)
Date: Thu, 19 Sep 91 12:54:03 EDT
Usual disclaimer to protect one's ego: This may be a stupid question,
but...
Why does the following open fail when the file exists and the directory
permissions are 'liwk'. If the file does not exist, the open works and
the file can be written to. If the file already exists, the open fails.
The directory is mode 0700 and the file (after it is created) is mode
0600. Here is the open:
if ((fd = open("Dir/file", O_APPEND|O_WRONLY|O_CREAT, 0600)) < 0)
perror("open O_APPEND|O_WRONLY|O_CREAT failed");
If I change the directory to 'rliwk', then it works fine. The problem
is that I want the program to be able to append without being able to
read. Any light that could be shed on the subject would be greatly
appreciated.
BTW, the purpose of this is to use the Elm mail filter to file away
messages from mailing lists. I know that I should be using 'messages',
but I hate waiting for the thing to start up just to read a quick
message.
Thanks,
Neil
--
Neil I. Weisenfeld phone: (301) 496-5363
Building 12A, Room 2033 uucp: uunet!nih-csl!weisen
National Institutes of Health Internet: weisen@alw.nih.gov
Bethesda, MD 20892