Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]/etc/portage/package.use directory permission
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
whjeon
n00b
n00b


Joined: 20 Nov 2017
Posts: 42
Location: Seoul,Korea(Republic of)

PostPosted: Sat Apr 28, 2018 8:41 am    Post subject: [SOLVED]/etc/portage/package.use directory permission Reply with quote

Hi! Always thanks for your help!

I'm wondering if I have to change permission of /etc/portage/package.use directory after full installation.

When I logged in to normal user, I cannot write to package.use file.
sudo also rejected, and have to log in root and then logout again back to normal user.

How did you solve this problem?

[More Information]
-Problem occurs when I want to emerge some package and they need certain USE flags.
-I usually do
Code:
 $echo 'some/package flag' >> /etc/portage/package.use/package.use

-I also added my account to VISUDO file.
-I also added my account to WHEEL group.


Last edited by whjeon on Sat Apr 28, 2018 11:08 am; edited 1 time in total
Back to top
View user's profile Send private message
Torro
n00b
n00b


Joined: 16 Apr 2018
Posts: 18
Location: Western Europe

PostPosted: Sat Apr 28, 2018 9:05 am    Post subject: Reply with quote

Hi whjeon,

Why not simply do package management from the root account?
Back to top
View user's profile Send private message
whjeon
n00b
n00b


Joined: 20 Nov 2017
Posts: 42
Location: Seoul,Korea(Republic of)

PostPosted: Sat Apr 28, 2018 9:06 am    Post subject: Reply with quote

Torro wrote:
Hi whjeon,

Why not simply do package management from the root account?


Because I thought it's not recommended for security issues. Isn' it??
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 41404
Location: 56N 3W

PostPosted: Sat Apr 28, 2018 9:25 am    Post subject: Reply with quote

whjeon,

You need to be root to run emerge. Editing the portage control files as root is really pact of that operation.
You can add your normal user to the portage group to run emerge.

By far the biggest security issue is your use of
Code:
echo 'some/package flag' >> ...

One day you will use > and overwrite the file, still, that's what backups are for :)
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Torro
n00b
n00b


Joined: 16 Apr 2018
Posts: 18
Location: Western Europe

PostPosted: Sat Apr 28, 2018 9:37 am    Post subject: Reply with quote

whjeon wrote:
Because I thought it's not recommended for security issues. Isn' it??


IMO it's riskier to give emerge rights to your normal user.


Last edited by Torro on Sat Apr 28, 2018 10:15 am; edited 1 time in total
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6209

PostPosted: Sat Apr 28, 2018 9:41 am    Post subject: Reply with quote

NeddySeagoon wrote:
One day you will use > and overwrite the file

Code:
set -C
Back to top
View user's profile Send private message
Torro
n00b
n00b


Joined: 16 Apr 2018
Posts: 18
Location: Western Europe

PostPosted: Thu May 03, 2018 10:30 am    Post subject: Reply with quote

mv wrote:
Code:
set -C


Thanks @mv! that's something I should probably keep in mind and/or set as default.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum