Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 269064

Summary: portage should be able to handle umask
Product: Gentoo Linux Reporter: Michael Weber (RETIRED) <xmw>
Component: Current packagesAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal CC: devurandom
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Michael Weber (RETIRED) gentoo-dev 2009-05-08 21:27:32 UTC
I've global umask 077 and this maybe is the source of the problem.
The installed openoffice has ownership root.root with no read//execute 
for group and other for the paths below 
/usr/lib64/openoffice/share/uno_packages/cache.
This is the location of some i18ne stuff.
You'll get an well documented error like http://www.oooforum.org/forum/viewtopic.phtml?t=70331&highlight=determined+language

This only applies at the first startup of the new version on a given .ooo3 directory.

Reproducible: Always

Steps to Reproduce:
1. remove ~/.ooo3
2. start oowriter 

Actual Results:  
Startup screen, and a dialog box with 

  The application cannot be started. 
  The user interface language cannot be determined

Expected Results:  
openoffice window
Comment 1 Michael Weber (RETIRED) gentoo-dev 2009-05-08 21:30:09 UTC
sry, quick'n'dirty work-around is as root
chmod -R a+r+X /usr/lib64/openoffice/share/uno_packages/cache
Comment 2 emerald 2009-05-08 22:03:16 UTC
The problem is indeed umask 077, for some time i had umask 007 and several 
Programs/libraries installed without other read/execute.
Comment 3 Michael Weber (RETIRED) gentoo-dev 2009-05-10 17:51:33 UTC
I think that the portage tools and layman were a little ignorant towards the umask situation. Umask 022 in the root shell is a security hole and should be avoided. I would prefer some umask awareness in the gentoo scripts and ebuilds.
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2009-05-12 20:50:05 UTC
(In reply to comment #3)
> I think that the portage tools and layman were a little ignorant towards the
> umask situation. Umask 022 in the root shell is a security hole and should be
> avoided. I would prefer some umask awareness in the gentoo scripts and ebuilds.
> 

Wait, what? You mean that you want portage to detect the *users* environment setting for umask? That is not possible or smart. If anything it should be openoffice that is checking ~/.ooo/ permissions and adjusting as needed.

Anyway, if you can define the problem or solution abit more we could gladly evaluate it some more. I'll leave this bug open but it will probably get closed within a week or less. thx for contributing.
Comment 5 Michael Weber (RETIRED) gentoo-dev 2009-05-13 22:43:05 UTC
Hi, 

no, I meant umask situation during installation.
The ebuilds do not touch umask or the permissions of the installed files.
So, if you install some software as root with umask 077, you'll create 
the installed files in /usr ... as root.root without read access for others.

It would be nice to have a ebuild/emerge that set the proccess' umask explicit
to 022 (python: os.umask), to reproduce the installation situation with gentoos default 022 umask.

That would be much better than chmod -R a+rX ... in every ebuild. 

This is not a openoffice specific bug/feature, should I suggest this at the mailing list?

Michael