Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!esosun!ucsdhub!sdcsvax!ucbvax!AMES-IO.ARPA!SERAFINI%RAL From: SERAFINI%RAL@AMES-IO.ARPA Newsgroups: comp.os.vms Subject: VMS/RMS question Message-ID: <8704250736.AA09643@ucbvax.Berkeley.EDU> Date: Thu, 23-Apr-87 16:33:08 EDT Article-I.D.: ucbvax.8704250736.AA09643 Posted: Thu Apr 23 16:33:08 1987 Date-Received: Sun, 26-Apr-87 19:58:37 EDT 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)