Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 82378 - portage should not change PORT_LOGDIR permissions
Summary: portage should not change PORT_LOGDIR permissions
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
Keywords: InVCS
Depends on:
Blocks: 181949 187293
  Show dependency tree
Reported: 2005-02-17 10:15 UTC by Adam
Modified: 2007-06-11 21:27 UTC (History)
0 users

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

only set permissions on PORT_LOGDIR if it is created automatically (logdir_perms.patch,723 bytes, patch)
2007-06-06 06:04 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam 2005-02-17 10:15:12 UTC
In /etc/make.conf.example it states, under the description of PORT_LOGDIR:
"Permissions will be modified as needed IF the directory exists"
In my opinion it should not do so.  I should be able to set whatever permissions I want on that directory so certain users or groups are allowed to read the logs.

Reproducible: Always
Steps to Reproduce:
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2005-02-17 10:23:41 UTC
Portage cannot drop privs and use logs if it does not set them to
something it can write to. If you do not use userpriv, it does not
change the permissions.
Comment 2 Adam 2005-02-17 10:26:53 UTC
What's userpriv?
Comment 3 Adam 2005-03-04 16:05:01 UTC
OK, I discovered userpriv is an option in the FEATURES keyword which makes it compile as the "portage" user instead of root.  I can see how it has to do something about the permissions if it can't write to the directory.  But at least I don't see why it has to remove the world readable and executable bits, which it did.  It could leave those the way they are while changing the other permission bits.
Comment 4 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 05:48:02 UTC
Fixed on or before 
Comment 5 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 06:58:45 UTC
Looking through the batch of bugs, I'm not sure that some of these are 
actually fixed in stable. Others, the requirements have possibly changed after 
the initial fix was committed. 
If you think this bug has been closed incorrectly, please reopen or ask that 
it be reopened. 
Comment 6 Adam 2005-07-22 07:33:01 UTC
Not fixed.  I'm now using portage-  I did a test of changing the
permissions of /var/log/portage to world executable, went back later to check,
and something changed them back.

I was able to work around it by changing the group of the folder to portage
instead of root.  This way I'm allowed to read the logs.  Nevertheless a
complete fix would be better, unless there's a good reason for changing the read
and execute bits.
Comment 7 Jason Stubbs (RETIRED) gentoo-dev 2005-07-28 07:25:22 UTC
Putting a hold on feature requests for portage as they are drowning out the 
bugs. Most of these features should be available in the next major version of 
portage. But for the time being, they are just drowning out the major bugs and 
delaying the next version's progress. 
Any bugs that contain patches and any bugs for etc-update or dispatch-conf can 
be reopened. Sorry, I'm just not good enough with bugzilla. ;) 
Comment 8 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 14:40:19 UTC
Reopening for consideration (no clue if this is fixed or not).
Comment 9 Marius Mauch (RETIRED) gentoo-dev 2007-06-05 17:15:03 UTC
I think this is fixed by using apply_permissions().
Comment 10 Zac Medico gentoo-dev 2007-06-06 06:00:08 UTC
In svn r6743 I've fixed it to only apply permissions when the directory is created automatically.
Comment 11 Zac Medico gentoo-dev 2007-06-06 06:04:30 UTC
Created attachment 121313 [details, diff]
only set permissions on PORT_LOGDIR if it is created automatically
Comment 12 Zac Medico gentoo-dev 2007-06-09 05:27:46 UTC
This has been released in
Comment 13 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-06-11 19:54:49 UTC
(In reply to comment #11)

You forgot to update:
Comment 14 Zac Medico gentoo-dev 2007-06-11 21:27:19 UTC
Thanks, updated in r6811.