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