Linked Questions

7
votes
7answers
245 views

Emptying a file for root user does not work [duplicate]

I use below command to empty a file > file.txt It works perfectly fine! But there are some files with root user permissions. So I tried sudo > different-file.txt and I got below verbose ...
0
votes
0answers
14 views

Permission denied when trying to write to a file in /sys directory [duplicate]

I'm trying to manually set the speed of the fan on my Macbook Pro 7.1 which is running Crunchbang Linux Waldorf. I'm following the instructions in this blog article ...
1
vote
1answer
103 views

Why do I get “Permission denied” when redirecting the output of sudo echo “xyz” to a file? [duplicate]

Why do I get -bash: test: Permission denied when I run sudo echo "xyz" > test The directory permissions are: drwxr-xr-x 3 root root 4096 2014-08-05 16:26 I have no problem creating a ...
1
vote
2answers
3k views

How to insert text into a root-owned file using sudo? [duplicate]

Possible Duplicate: Redirecting stdout to a file you don't have write permission on Running a command like sudo echo 'text' >> /file.txt fails with: bash: /file.txt: Permission ...
9
votes
3answers
2k views

Execute a line of commands with one sudo

For example if I want to create a file and enter text in one line I can redirect the output into a file with the use of the > operator: echo "something" > /path/foobar but if I don't have ...
0
votes
1answer
43 views

Write a file in /var/lib/sysnews/ [duplicate]

In that folder are stored the news files: they can be created by the system administrator to write some informations for the users, as suggested in this link. I tried as a normal user to add a file ...
2
votes
4answers
2k views

Unable to write to a GPIO pin despite file permissions on /sys/class/gpio/gpio18/value

This is on a Raspberry Pi. Here's the output of sudo ls -lL /sys/class/gpio/gpio18: -rwxrwx--- 1 root gpio 4096 Mar 8 10:50 active_low -rwxrwx--- 1 root gpio 4096 Mar 8 10:52 ...
7
votes
4answers
2k views

sudo permission denied but su grants permission

this is the first occurrence where su was required for me. I read an article about changing the value in /sys/devices/virtual/backlight/acpi_video0/brightness to alter my laptop's screen brightness. ...
7
votes
3answers
5k views

bash: /dev/stderr: Permission denied

After upgrading to a new release version, my bash scripts start spitting errors: bash: /dev/stderr: Permission denied in previous versions Bash would internally recognize those file names (which is ...
3
votes
2answers
410 views

insert text in a file using echo command [duplicate]

I am trying to insert some text in a file in the following way sudo echo "abc-abc/abc/abc" >> /etc/portage/make.conf but it give me the error Permission denied although I am using sudo ...
2
votes
1answer
590 views

Can't edit /proc/sys/net/core/wmem_max [duplicate]

Recently my wireless network has being stopping to transfer data from some irregular time intervals that vary from 30 seconds to 20 minutes, and every time I need to plug off and then on the wireless ...

15 30 50 per page