sudo piping

Bug #1024536 reported by Ohadcn
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Confirmed
Undecided
Unassigned

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@comp1:~$ sudo echo 10 > /proc/sys/vm/swappiness
bash: /proc/sys/vm/swappiness: Permission denied
ohad@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@comp1:~$

Tags: bash pipe sudo
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bash (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.