View previous topic :: View next topic |
Author |
Message |
fturco Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 08 Dec 2010 Posts: 1181 Location: Italy
|
Posted: Tue May 21, 2019 7:59 pm Post subject: [SOLVED] Portage warning message when running as a user |
|
|
Portage shows the following error messages when running as from an unprivileged user (fturco):
Code: | $ emerge -p gcc
!!! Directory initialization failed: '/var/lib/portage'
!!! chown('/var/lib/portage', -1, 1000)
!!! Directory initialization failed: '/var/cache/edb'
!!! chown('/var/cache/edb', -1, 1000)
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] sys-devel/gcc-9.1.0 |
Some other info from my system:
Code: | $ id fturco
uid=1000(fturco) gid=1000(fturco) groups=1000(fturco),18(audio),19(cdrom),249(input),7(lp),106(lpadmin),105(plugdev),250(portage),101(scanner),85(usb),100(users),27(video),10(wheel) |
Code: | $ id portage
uid=250(portage) gid=250(portage) groups=250(portage) |
The emerge --info -v command returns the following variables:
Code: | PORTAGE_GID="1000"
PORTAGE_INST_GID="1000"
PORTAGE_INST_UID="1000"
PORTAGE_USERNAME="fturco" |
I haven't explicitely set any of the previous portage variables in any file under the /etc/portage directory. I found this Funtoo bug report with a similar problem, but I can't understand how to apply their solution to my situation. Can anyone help me please?
Last edited by fturco on Sun May 26, 2019 9:13 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 21920
|
Posted: Wed May 22, 2019 2:00 am Post subject: |
|
|
What was their solution? The linked bug report shows only an initial comment, with no responses before it was closed as "Expected Behavior." |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pjp Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/1154772887439692d88303b.jpg)
Joined: 16 Apr 2002 Posts: 20113
|
Posted: Wed May 22, 2019 2:45 am Post subject: |
|
|
@Hu: Maybe a rendering issue? I see what fturco alluded to at the bug report.
@fturco: I'm skeptical of the "solution" and even more so about it being relevant to your situation.
The PORTAGE_USERNAME and PORTAGE*ID variables are set in make.conf (per the make.conf man page). Have you double-checked to make sure nothing is set? Also check in /etc/portage/profiles, local repos or other overlays. I'm not sure if those variables could be set there, but seems easy enough to check.
Also, what version of portage? I have sys-apps/portage-2.3.62-r2 and do not see this behavior. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Tony0945 Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Wed May 22, 2019 3:09 am Post subject: |
|
|
I've been running portage as root for many years. I never recall being to emerge as a user. Perhaps the user should be in the portage group?
Also try Code: | chown -R portage:portage /usr/portage | as root to wipe out any possible root ownership. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 21920
|
Posted: Wed May 22, 2019 4:12 am Post subject: |
|
|
pjp wrote: | @Hu: Maybe a rendering issue? I see what fturco alluded to at the bug report. | Probably. That tracker is a JIRA instance, and JIRA has had problems for years with malfunctioning under NoScript. They don't seem interested in fixing it. If I remember correctly, the problem is that the initially returned document is missing the responsive comments. Those all get added later with separate calls back to the server, which both lengthens page load time and causes an annoying jumpy effect as the browser repeatedly reflows the page to handle the late-added content. Browsers have gotten quite good at avoiding reflows for the main document, so eliminating all the extra callbacks would be an improvement in every respect: no more junk reflows; page load time improves; bandwidth consumed decreases by avoiding all the extra requests and round trips; page works under NoScript; page is directly useful to spider tools. Of course, most developers that create pages like that seem to think it's a feature that their page is broken when JavaScript is not executed. Tony0945 wrote: | Perhaps the user should be in the portage group? | He already is in that group. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fturco Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 08 Dec 2010 Posts: 1181 Location: Italy
|
Posted: Wed May 22, 2019 8:07 am Post subject: |
|
|
pjp wrote: | The PORTAGE_USERNAME and PORTAGE*ID variables are set in make.conf (per the make.conf man page). Have you double-checked to make sure nothing is set? Also check in /etc/portage/profiles, local repos or other overlays. I'm not sure if those variables could be set there, but seems easy enough to check. |
The following commands display nothing:
Code: | grep PORTAGE_USERNAME -r /var/db/repos /etc/portage
grep PORTAGE_GID -r /var/db/repos /etc/portage
grep PORTAGE_INST_GID -r /var/db/repos /etc/portage
grep PORTAGE_INST_UID -r /var/db/repos /etc/portage |
pjp wrote: | Also, what version of portage? I have sys-apps/portage-2.3.62-r2 and do not see this behavior. |
I have sys-apps/portage-2.3.66-r1. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fturco Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 08 Dec 2010 Posts: 1181 Location: Italy
|
Posted: Wed May 22, 2019 8:14 am Post subject: |
|
|
Tony0945 wrote: | Also try Code: | chown -R portage:portage /usr/portage | as root to wipe out any possible root ownership. |
Unfortunately the following command doesn't fix the problem:
Code: | chown -R portage:portage /var/cache/distfiles /var/cache/binpkgs /var/db/repos |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fturco Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 08 Dec 2010 Posts: 1181 Location: Italy
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fturco Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 08 Dec 2010 Posts: 1181 Location: Italy
|
Posted: Sun May 26, 2019 9:12 am Post subject: |
|
|
I solved my problem. It was due to the fact that the root directory (/) belonged to the fturco:fturco user and group instead of root:root. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
XenHat n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 30 Sep 2019 Posts: 8 Location: Canada
|
Posted: Sat Dec 07, 2019 12:52 am Post subject: |
|
|
I was also able to get rid of the warning by changing the ownership of / to root:
Code: | # chown root:root / |
Warning: do NOT include -R _________________ You cannot fix what you haven't broken. I break things a lot. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|