[EMAIL PROTECTED] schreef: > Le Mercredi, 6 Juillet 2005 15.52, Holly Bostick a ecrit : > >>Hey, ho-- >> >>I've finally got around to setting up sudo. It works fine, except for >>one thing. >> >>I made a Cmd_Alias group which includes a lot of utility apps. And, like >>many of you, I included emerge in this group. >> >>But a lot of the time, I have to echo to one of the files in >>/etc/portage. >> >>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 >> >>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. >> >>Or could it be something else? >> >>In any case, does anybody know how I could fix this? It's really >>screwing up my useability, which was just starting to shape up nicely :-) . >> >>Thanks, >>Holly > > > I think the problem come from the fact that echo is sudo-ed but the shell > redirection isn't. > > Compare this: > su -c "echo foo > /etc/portage/whatever" > and > su -c "echo foo" > /etc/portage/whatever > > The first one will succeed, but not the second. > > To solve your problem, I would just do: > chgrp -R portage /etc/portage > chmod -R g+w /etc/portage >
Well, it didn't work (this to all the respondents). I did change the group and mod of /etc/portage, but even before I did: "sudo echo 'media-video/xine-ui ~x86' >>/etc/portage/package.keywords" -bash: sudo echo 'media-video/xine-ui ~x86' >>/etc/portage/package.keywords: Onbekend bestand of map ("unknown file or folder", which is at least different, but not really much of an improvement, and no, before someone asks, putting a space before /etc doesn't help) and even after chowning and chmodding: sudo echo 'media-video/xine-ui ~x86' >>/etc/portage/package.keywords -bash: /etc/portage/package.keywords: Toegang geweigerd (permission refused) with the quotes, it's unknown file or folder. la /etc/portage totaal 51 drwxrwxr-x 5 root portage 384 jun 13 00:40 . drwxr-xr-x 88 root root 7312 jul 6 16:15 .. -rw-rw-r-- 1 root portage 9757 jul 6 17:09 package.keywords -rw-rw-r-- 1 root portage 6164 mei 26 11:47 package.keywords~ -rw-rw-r-- 1 root portage 64 jun 15 05:27 package.mask -rw-rw-r-- 1 root portage 100 mei 16 14:57 package.mask~ -rw-rw-r-- 1 root portage 105 jun 15 05:27 package.unmask -rw-rw-r-- 1 root portage 103 mei 15 21:09 package.unmask~ -rw-rw-r-- 1 root portage 2252 jun 30 12:32 package.use -rw-rw-r-- 1 root portage 1616 mei 12 15:46 package.use~ drwxrwxr-x 2 root portage 80 nov 26 2004 profile drwxrwxr-x 2 root portage 72 jun 2 13:10 profiles drwxrwsr-x 2 root portage 48 okt 27 2004 sets Not really sure what good the portage group was supposed to do anyway, since root is a member of that group, but then again root owns the whole shebang anyway. The user is not a member of the portage group. Should I chown the folder -R to users? (seems again quite not the point)? It still seems that what I really want is a login shell that I'm not getting. I'm really lost. Where am I going wrong? Oh, btw, just remembered-- this is bash 3. Does that make a difference? Holly -- gentoo-user@gentoo.org mailing list