Re: file permissions
Bill Nitzberg (nitzberg@nas.nasa.gov)
Wed, 25 Sep 1996 19:16:32 -0700
> Date: Thu, 12 Sep 1996 16:51:43 -0500
> From: Rajeev Thakur <thakur@mcs.anl.gov>
>
> > Date: Thu, 12 Sep 1996 14:30:19 -0700 (PDT)
> > From: Richard Frost <frost@sdsc.edu>
> >
> > Sounds like another info key to me.
>
> It could be done using info. But I suspect there will be many users who
> don't ever want to use info and will happily pass MPI_INFO_NULL all
> the time, because they are unfamiliar with the concept. File
> permission, on the other hand, is something they know about for years,
> and would like to be able to specify it in a simple way.
>
> Since file permission is there in the Unix open() API, someone porting
> from Unix to MPI-IO would immediately ask: "How do I specify file
> permissions?"
>
> The advantage of leaving the format of file permissions to be
> implementation dependent is that we don't have to specify it for all
> possible operating systems or file systems.
> Though I guess most implementations will support the Unix style.
In general, it is hard to specify filesystem issues (such as
file permissions) in a portable manner.
To me, portability means that a correctly written program (one
that conforms to the MPI specification) should not only compile,
but also run correctly. If we allow an implementation dependent
parameter, we lose both these aspects of portability.
An implementation-dependent MPI_Perm would encourage users to
include machine dependent code (e.g. NASA_MPI_PERM_ALLREAD)
which will not compile everywhere. Worse, if one implementation
requires a pointer to an access control list, but the program
was written to pass a UNIX permission (e.g. 0644), it is likely
that the program will produce a segmentation fault.
If we want to add file permissions to I/O, then I think we either
have to add them as an info argument, or completely specify the
legal values for "MPI_Perm" (e.g. MPI_USERREAD, MPI_USERWRITE, ...).
- bill