Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 67031 - sudo emerge firefox without -H puts root-owned .mozilla in users' home directory
Summary: sudo emerge firefox without -H puts root-owned .mozilla in users' home directory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-10 19:32 UTC by michael@smith-li.com
Modified: 2004-11-14 18:22 UTC (History)
0 users

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@smith-li.com 2004-10-10 19:32:30 UTC
Firefox dies without a useful error message if ~/.mozilla is unreadable (chowned by root).

Reproducible: Always
Steps to Reproduce:
1. $ sudo emerge firefox
2. $ firefox
Actual Results:  
Firefox said 'no running windows found' and quit. I finally figured out that
.mozilla was unreadable by my user because it was owned by root. Chowning it or
deleting it fixed the problem.

Expected Results:  
.mozilla should have been created when I started firefox as user, not during emerge.

Somewhat related to bug 56009.
Comment 1 Aron Griffis (RETIRED) gentoo-dev 2004-11-14 18:22:44 UTC
Thanks, fixed in mozilla-firefox-1.0-r2 without bumping the revision.  Also fixed in mozilla-thunderbird-0.9-r2.  mozilla seamonkey seems to use a different method.

--- mozilla-firefox-1.0-r2.ebuild       14 Nov 2004 03:27:04 -0000      1.1
+++ mozilla-firefox-1.0-r2.ebuild       15 Nov 2004 02:15:42 -0000
@@ -154,9 +154,14 @@
        env-update
 
        # Register Components and Chrome
+       #
+       # Bug 67031: Set HOME=~root in case this is being emerged via sudo.
+       # Otherwise the following commands will create ~/.mozilla owned by root
+       # and 700 perms, which makes subsequent execution of firefox by user
+       # impossible.
        einfo "Registering Components and Chrome..."
-       LD_LIBRARY_PATH=/usr/lib/MozillaFirefox ${MOZILLA_FIVE_HOME}/regxpcom
-       LD_LIBRARY_PATH=/usr/lib/MozillaFirefox ${MOZILLA_FIVE_HOME}/regchrome
+       HOME=~root LD_LIBRARY_PATH=/usr/lib/MozillaFirefox ${MOZILLA_FIVE_HOME}/regxpcom
+       HOME=~root LD_LIBRARY_PATH=/usr/lib/MozillaFirefox ${MOZILLA_FIVE_HOME}/regchrome
 
        # Fix permissions of component registry
        chmod 0644 ${MOZILLA_FIVE_HOME}/components/compreg.dat