Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ames!ucbcad!ucbvax!UKANVAX.BITNET!SLOANE From: SLOANE@UKANVAX.BITNET (Bob Sloane) Newsgroups: comp.os.vms Subject: Creating files from C Message-ID: <8708090436.AA09493@ucbvax.Berkeley.EDU> Date: Fri, 7-Aug-87 10:27:00 EDT Article-I.D.: ucbvax.8708090436.AA09493 Posted: Fri Aug 7 10:27:00 1987 Date-Received: Sun, 9-Aug-87 13:20:46 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 35 Consider the following (very simple) C program. #include stdio main() { FILE *fd; fd = fopen("test.file","w"); fprintf(fd,"This is a test."); fclose(fd); } If I compile, link and run this program, it works just fine, and TEST.FILE is created under my current directory with my current default protections. Just as expected so far. Now suppose I change protections on the file TEST.FILE. I would expect that, when I run the program again, the new version of the file would have the same protections as the first version. Wrong. It has my default protections. I always thought that the default protections on a file came from: 1. a previous of the same file, if one exists 2. From the DEFAULT_PROTECTION ACL on the directory, of one exists 3. from the PROCESS default protection. At least that is what it says in the DCL Concepts manual on page 7-6. Apparently C always uses the PROCESS default protection. Can anyone tell me why, or should I SPR this? Bob Sloane University of Kansas Computer Center (913) 864-0444 SLOANE@UKANVAX on BITNET