From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1DqB04-000119-00 for garchives@archives.gentoo.org; Wed, 06 Jul 2005 14:35:44 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j66EVtgY017889; Wed, 6 Jul 2005 14:31:55 GMT Received: from nemesis.jesus.ox.ac.uk (nemesis.jesus.ox.ac.uk [163.1.136.38]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j66ELLUO020520 for ; Wed, 6 Jul 2005 14:21:21 GMT Received: from hc18.jesus.ox.ac.uk ([163.1.165.18] helo=anya) by nemesis.jesus.ox.ac.uk with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.32) id 1DqAmz-0005vq-L2 for gentoo-user@lists.gentoo.org; Wed, 06 Jul 2005 15:22:13 +0100 Received: from capella.catmur.co.uk (capella.catmur.co.uk [::ffff:192.168.1.2]) by anya with esmtp; Wed, 06 Jul 2005 15:22:10 +0100 Subject: Re: [gentoo-user] sudo echo cannot write to /etc/ files ? From: Edward Catmur To: gentoo-user@lists.gentoo.org In-Reply-To: <42CBE237.7050508@planet.nl> References: <42CBE237.7050508@planet.nl> Date: Wed, 06 Jul 2005 15:22:07 +0100 Message-Id: <1120659727.13823.8.camel@capella.catmur.co.uk> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Mailer: Evolution 2.2.1.1 X-Archives-Salt: 72fd58fe-6cff-4131-8fbb-9679b1f3665e X-Archives-Hash: 62a3f2cbe1cae568ae08c9aece647804 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. -- gentoo-user@gentoo.org mailing list