[Bug 1024536] [NEW] sudo piping

Ohadcn 1024536 at bugs.launchpad.net
Fri Jul 13 20:02:47 UTC 2012


Public bug reported:

i don't know if it is a bug or the OS should behave like that, but i would prefer it other way.
when i run a command as sudo and pipe it to another command or to a file, the command piped as normal user, when i typed

ohad at comp1:~$ sudo echo 10 > /proc/sys/vm/swappiness
bash: /proc/sys/vm/swappiness: Permission denied
ohad at comp1:~$ sudo echo firefox | apt-get install 
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
ohad at comp1:~$

** Affects: bash (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: bash pipe sudo

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1024536

Title:
  sudo piping

Status in “bash” package in Ubuntu:
  New

Bug description:
  i don't know if it is a bug or the OS should behave like that, but i would prefer it other way.
  when i run a command as sudo and pipe it to another command or to a file, the command piped as normal user, when i typed

  ohad at comp1:~$ sudo echo 10 > /proc/sys/vm/swappiness
  bash: /proc/sys/vm/swappiness: Permission denied
  ohad at comp1:~$ sudo echo firefox | apt-get install 
  E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
  E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
  ohad at comp1:~$

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1024536/+subscriptions




More information about the foundations-bugs mailing list