[GRASS-dev] Directory security/permission issue

Glynn Clements glynn at gclements.plus.com
Fri Jul 13 11:26:09 EDT 2007


Hamish wrote:

> Glynn Clements wrote:
> > Also, lib/init/init.sh had two occurrences of:
> > 
> > 	echo "umask 022" >> "$bashrc"
> > 
> > which I have removed.
> 
> any g.access repercussions to this? (beyond the obvious)
> 
> > The remaining occurrence:
> > 
> > 	tmp=/tmp/grass6-$USER-$GIS_LOCK
> > 	(umask 077 && mkdir "$tmp") || {
> > 
> > has been retained, although I'm not sure why this doesn't just use
> > "mkdir -m 007" rather than (temporarily) setting the umask.
> 
> 
> my inspiration for that:
>   http://www.linuxsecurity.com/content/view/115462/151/#mozTocId648982
> 
> Is 'mkdir -m' portable?

It is according to:

http://www.opengroup.org/onlinepubs/009695399/utilities/mkdir.html

OTOH, umask is probably more portable, so I don't see any reason to
change it.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list