95?10?08?18?pm@bnr.ca>
Reply-To: grassu-list@max.cecer.army.mil
NNTP-Posting-Host: ux1.cso.uiuc.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Originator: daemon@ux1.cso.uiuc.edu
mccauley@ecn.purdue.edu (James Darrell McCauley) writes:
>Bingo! "umask(0);" on line 70. I remove this line and my shell's
>umask was obeyed.Here is what Michael says to this:
GRASS creates all files with 0666 and all directories in a mapset with
0777. It wants to make sure that all files in a mapset are public
readable and all directories are piblic read/searchable. (Perhaps a
umask of 022 might be ok - removing write for group/other. But look at
G_tempfile() - the Panel_Save in the graphics needs a publicly
writeable tempfile.)
Why does this need to be *publicly* writable? Tempfiles are created exclusively
in mapsets owned by the user.
I will assert, as I believe that other will back up, that earlier versions of
GRASS did not force mapset directories to 777; at the very least, it allowed
our individual umasks to override any permissions being set. My earlier
(GRASS4.0) understanding of GRASS permissions was that Locations should be
publicly writable, and Mapsets should be publicly readable/executable.
Although it doesn't spell out the Mapset directory specifically, page 20
of the _GRASS4.1 Programmer's Manual_ (Shapiro, Westervelt, et al.) has the
following footnote:
This means -rw-r--r-- for files, and drwxr-xr-x for directories. It
is accomplished by setting the umask to 022 in all GRASS programs.
Comments and feedback on this are welcome!
--
-Malcolm
Access to the maspset and to all its files and directories
is controlled by g.access which changes permission on the mapset
itlsef so that group/other can/can't see into the mapset (by removing
tjhe r and x permissions).If we make changes to this we risk breaking what works.
We have to make sure that anybody can read all files in any mapset
as long as the permission on the mapset itself allow users to
see the files (these permisison are under user control with g.access).Michael (ext 277)
I just wanted to post this warning for Michael for those
who want to get rid of umask(0)
lga
--
Malcolm D. Williamson - GIS Specialist E-mail: malcolm@cast.uark.edu
Center for Advanced Spatial Technologies Telephone: (501) 575-6159
Ozark Rm. 12 Fax: (501) 575-5218
University of Arkansas
Fayetteville, AR 72701