Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!lll-lcc!ames!ucbcad!ucbvax!uvacs.UUCP!uucp From: uucp@uvacs.UUCP (UNIX-to-UNIX Copy) Newsgroups: comp.os.vms Subject: Submission for mod-computers-vax Message-ID: <8704261025.AA05812@uvacs.cs.virginia.edu> Date: Sun, 26-Apr-87 06:25:37 EDT Article-I.D.: uvacs.8704261025.AA05812 Posted: Sun Apr 26 06:25:37 1987 Date-Received: Sat, 2-May-87 10:16:06 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 33 Path: uvacs!virginia!umd5!brl-adm!seismo!esosun!ucsdhub!sdcsvax!ucbvax!AMES-IO.ARPA!SERAFINI%RAL From: SERAFINI%RAL@AMES-IO.ARPA Newsgroups: mod.computers.vax Subject: VMS/RMS question Message-ID: <8704250736.AA09643@ucbvax.Berkeley.EDU> Date: 23 Apr 87 21:33:08 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 22 info-vaxers, I feel foolish for asking this question, but I've looked everywhere I know and can't find a solution. How can I find out if a file is readable or writable given the current process' priveleges? I've tried F$File_Attributes to get the protection string, but I found the gotcha that a file can have read protection set, but the directory file that contains the file doesn't. Obviously, having to check read protection on every directory in the path is a real hassle, especially from DCL. Is there some system service I don't know about that combines all the processing necessary to achieve this? I know it's non-trivial, and I assume that it's been done but I just haven't learned yet. The problem also exists for trying to write files. Is there a better solution than opening the file and testing for failure? Thanks much. Dave Serafini Sterling Software NASA/Ames Research Center serafini%ral@ames-io.arpa or RAL::SERAFINI (SPAN node 24.6)