Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 127134 - stage3 x86 and 686 tarballs have incorrect permissions on /var/lib/portage
Summary: stage3 x86 and 686 tarballs have incorrect permissions on /var/lib/portage
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Release Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-21 18:42 UTC by Dan Martins
Modified: 2006-09-01 13:24 UTC (History)
2 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 Dan Martins 2006-03-21 18:42:15 UTC
The file permissions on the directory /var/lib/portage in both the stage3-i686-2006.0.tar.bz2 and stage3-x86-2006.0.tar.bz2 are set to 750 with owner and group root. This prevents all users, and more importantly members of the portage group from reading the world file, which can cause the output of emerge -vpuDN world to vary greatly if run as a user or as root.

I hope i didn't screw up the octal permissions. They are drwxr-x---

Both of these stage3 tarballs were downloaded from gentoo.mirrored.ca but the creation date of these files is the same on several other mirrors so i would guess the problem exists elsewhere.

I believe the permissions should be drwxrws---
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2006-03-22 06:33:50 UTC
The x86 team doesn't have anything to do with this.  Also, as an aside, we don't set the permissions on that directory in any way.  It is done 100% through portage, meaning that it is very likely that the portage ebuild is doing something wrong in this case.  I will investigate more and reassign this as appropriate.
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2006-03-22 06:57:05 UTC
It isn't the portage ebuild. It's portage itself:

if not os.path.exists(root+"var/lib/portage"):
	writemsg(">>> "+root+"var/lib/portage doesn't exist, creating it...\n")
	try:
		os.mkdir(root+"var",0755)
	except (OSError,IOError):
		pass
	try:
		os.mkdir(root+"var/lib",0755)
	except (OSError,IOError):
		pass
	try:
		os.mkdir(root+"var/lib/portage",02750)
	except SystemExit, e:
		raise
	except:
		writemsg("portage: couldn't create /var/lib/portage; exiting.\n")
		sys.exit(1)

I recently had to add code similar to this to the installer for creating the dynamic-stage3, since it doesn't call portage directly.
Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2006-08-23 07:08:02 UTC
Was this ever modified/fixed/whatever?  We're using 2.1-r2 for 2006.1's release.
Comment 4 Andrew Gaffney (RETIRED) gentoo-dev 2006-08-23 08:09:03 UTC
From stage3-i686-2006.1.tar.bz2:

drwxr-s--- 2 root portage 4096 Aug  3 10:39 var/lib/portage

It's not the same as what's in the 2006.0 tarball as reported above, but it's also not the same as on my installed system:

drwxrws--- 2 root portage 4096 Aug 22 15:31 /var/lib/portage
Comment 5 Chris Gianelloni (RETIRED) gentoo-dev 2006-08-23 08:42:27 UTC
Which portage version is your system, though?

Anyway... this looks like it is fixed in the newer portage and will be fixed for the release, so I'll close it once the release hits the mirrors.
Comment 6 Chris Gianelloni (RETIRED) gentoo-dev 2006-09-01 13:24:36 UTC
Release has hit the mirrors... FIXED.