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

Bug 56009

Summary: Firefox overwrites bookmarks when started with "sudo firefox"
Product: Gentoo Linux Reporter: Murph <MattFinn>
Component: Current packagesAssignee: Mozilla Gentoo Team <mozilla>
Status: RESOLVED INVALID    
Severity: major    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Murph 2004-07-03 18:27:26 UTC
If i run "sudo firefox", exit, then run firefox (all as a user), the bookmarks file wil be erased/blanked/resest to very small. This has happened twice now.

This is my first bug, please comment nicely if i've stepped out of line or done it wrong. I listed it as "Major" because it can cause loss of sometimes important data.

Reproducible: Always
Steps to Reproduce:
1. in console, as user, "sudo firefox"
2. File, Quit
3. then just run "firefox"

Actual Results:  
All custom bookmarks are missing

Expected Results:  
Kept them!

murph 4pttzyke.slt # emerge info
Portage 2.0.50-r8 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0,
2.6.7-rc3-mm2)
=================================================================
System uname: 2.6.7-rc3-mm2 i686 AMD Athlon(TM) XP 2400+
Gentoo Base System version 1.4.16
distcc 2.14 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-Os -march=athlon-xp -pipe -fomit-frame-pointer -mfpmath=sse,387"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-Os -march=athlon-xp -pipe -fomit-frame-pointer -mfpmath=sse,387"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoclean ccache sandbox"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo
http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X aalib alsa amd apm autofs avi berkdb cdr crypt cups dga
distribution dnd dv dvb dvd encode esd ethereal fbcon ffmpeg fftw foomaticdb
gdbm gif gpm gtk gtk2 imlib java javascript jikes jpeg libg++ libwww mad mikmod
mmx motif mpeg ncurses nls nvidia offensive oggvorbis openal opengl oss pam pda
pdflib perl png python qt quicktime readline samba scanner sdl slang spell ssl
svga tcltk tcpd transcode truetype v4l videos x86 xine xml2 xmms xv zlib"
Comment 1 Vinicius Baggio 2004-08-07 12:02:12 UTC
Well, as I've investigated, the bookmark isn't overwritten. If you go to ~/.mozilla/firefox/<your profile/ and see permissions of these files: 
bookmarks.html and
US/bookmarks.html 
they get "owned" by root, or the other user, so you can't have access to them, causing the effect of losing your bookmarks. If you "chown" these files to the correct user, it seems the bookmarks are recovered.
can anyone try it?
Comment 2 Aron Griffis (RETIRED) gentoo-dev 2004-11-13 16:39:13 UTC
Problem here is that "sudo" leaves HOME=~user instead of HOME=~root.  This is user error... you should either run "sudo -H firefox" to set HOME correctly, or don't run firefox as root!