Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 269064 - portage should be able to handle umask
Summary: portage should be able to handle umask
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 884947 (view as bug list)
Depends on: 868669
Blocks:
  Show dependency tree
 
Reported: 2009-05-08 21:27 UTC by Michael Weber (RETIRED)
Modified: 2022-12-11 17:00 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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-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
Comment 6 SpanKY gentoo-dev 2022-09-06 06:50:31 UTC
portage should already be isolating the ebuild runtime from the user's umask settings.  no matter what the user's or root's umask settings are, portage should be resetting this.  it has been too for longer than this bug has been around.

ebuild.sh has near its top:
> # if no perms are specified, dirs/files will have decent defaults
> # (not secretive, but not stupid)
> umask 022

everyone involved in this report have prob moved on, and we don't seem to have any new reports since.  would be nice to have a repro case before we investigate further.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-11 17:00:13 UTC
*** Bug 884947 has been marked as a duplicate of this bug. ***
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-11 17:00:56 UTC
We seem to have had a case of this in bug 884947.