Gentoo Archives: gentoo-user

From: Edward Catmur <ed@×××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] sudo echo cannot write to /etc/ files ?
Date: Wed, 06 Jul 2005 14:35:44
Message-Id: 1120659727.13823.8.camel@capella.catmur.co.uk
In Reply to: [gentoo-user] sudo echo cannot write to /etc/ files ? by Holly Bostick
1 On Wed, 2005-07-06 at 15:52 +0200, Holly Bostick wrote:
2 > Echo is in the sudo-ed group, and echo isn't the problem-- the problem
3 > is that permission is refused to write to the file itself (which is an
4 > error *from* echo, so it would seem that echo itself is OK as far as
5 > sudo goes). Which means that I have to su anyway, to echo to the file,
6 > which really isn't the point of the exercise.
7 >
8 > As I see it, this error can mean only one of two things:
9 >
10 > sudo does not give me a login shell (so my UID is 'really' still my UID
11 > and not root's, and I don't have permission to write to the file); or
12 >
13 > there is another, "invisible" cli utility responsible for actually
14 > writing to the file, which is not sudo-ed.
15
16 If you're using e.g. "sudo echo package >> /etc/portage/package.unmask"
17 then the redirection takes place in your shell, not in sudo.
18
19 HTH.
20
21 --
22 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] sudo echo cannot write to /etc/ files ? Holly Bostick <motub@××××××.nl>