From: Holly Bostick <motub@planet.nl>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] sudo echo cannot write to /etc/ files ?
Date: Wed, 06 Jul 2005 16:54:41 +0200 [thread overview]
Message-ID: <42CBF0B1.1020308@planet.nl> (raw)
In-Reply-To: <1120659727.13823.8.camel@capella.catmur.co.uk>
Edward Catmur schreef:
> On Wed, 2005-07-06 at 15:52 +0200, Holly Bostick wrote:
>
>>Echo is in the sudo-ed group, and echo isn't the problem-- the problem
>>is that permission is refused to write to the file itself (which is an
>>error *from* echo, so it would seem that echo itself is OK as far as
>>sudo goes). Which means that I have to su anyway, to echo to the file,
>>which really isn't the point of the exercise.
>>
>>As I see it, this error can mean only one of two things:
>>
>>sudo does not give me a login shell (so my UID is 'really' still my UID
>>and not root's, and I don't have permission to write to the file); or
>>
>>there is another, "invisible" cli utility responsible for actually
>>writing to the file, which is not sudo-ed.
>
>
> If you're using e.g. "sudo echo package >> /etc/portage/package.unmask"
> then the redirection takes place in your shell, not in sudo.
>
> HTH.
>
OK, you all likely realize that I responded before I had got the three
more messages telling me what to do.
I'm sure it will work (three people telling you the exact same thing is
pretty convincing ;-) ), but what I don't understand is why/how, if I
want to
sudo echo 'media-video/xine-ui ~x86' >>/etc/portage/package.keywords
changing that to
"sudo echo media-video/xine-ui ~x86 >>/etc/portage/package.keywords"
is going to write the line
media-video/xine-ui ~x86
to /etc/portage/package.keywords-- i.e., why are the internal quotes no
longer necessary?
Or should it be
"sudo echo 'media-video/xine-ui ~x86' >>/etc/portage/package.keywords"
or will that *really* screw everything up?
(As you see, my understanding of bash is trying to improve, with only
very limited success :-) ).
Holly
--
gentoo-user@gentoo.org mailing list
next prev parent reply other threads:[~2005-07-06 15:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-06 13:52 [gentoo-user] sudo echo cannot write to /etc/ files ? Holly Bostick
2005-07-06 14:02 ` A. Khattri
2005-07-06 14:25 ` Holly Bostick
2005-07-06 14:20 ` David Morgan
2005-07-06 14:20 ` gentoo
2005-07-06 15:21 ` Holly Bostick
2005-07-06 15:29 ` Christoph Gysin
2005-07-06 15:39 ` gentoo
2005-07-07 3:42 ` Boyd Stephen Smith Jr.
2005-07-07 5:31 ` Richard Fish
2005-07-06 14:22 ` Edward Catmur
2005-07-06 14:54 ` Holly Bostick [this message]
2005-07-06 15:12 ` David Morgan
2005-07-06 15:26 ` Neil Bothwick
2005-07-06 15:28 ` Christoph Gysin
2005-07-06 16:07 ` Holly Bostick
2005-07-06 16:47 ` Christoph Gysin
2005-07-06 18:22 ` Richard Fish
2005-07-06 18:36 ` Holly Bostick
2005-07-06 19:12 ` Richard Fish
2005-07-06 19:42 ` Holly Bostick
2005-07-06 20:28 ` John J. Foster
2005-07-06 20:52 ` Manuel McLure
2005-07-06 19:13 ` Christoph Gysin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42CBF0B1.1020308@planet.nl \
--to=motub@planet.nl \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox