Hi,
I want as a normal user in a/sys file can write. The call is. Xsession built:
sudo echo "something">/sys/somewhere/something
That, it disagreed. The rights of the file are-rw-r - r -, ie writable for root.
someone why?
Hi,
I want as a normal user in a/sys file can write. The call is. Xsession built:
sudo echo "something">/sys/somewhere/something
That, it disagreed. The rights of the file are-rw-r - r -, ie writable for root.
someone why?
This is because only the `echo" something "` is running as root, but the shell tried under their own rights in the file to write. One possible remedy is
sudo sh-c 'echo "something">/sys/somewhere/something'
Whether this is however a good idea, the user sudo sh allow, you need to know.
For "normal" files are acl's for something very good, unfortunately, the (at least on my system) to / sys supports. If you still need other ideas, then ask again for ...
The issue is that it's your shell that handles redirection; it's trying to open the file with your permissions not those of the process you're running under sudo.
Use something like this, perhaps:
Code:sudo sh -c "echo 'something' >> /etc/privilegedFile"
Hi,
use the tee command, as follows:
Code:echo 'test' | sudo tee -a /root/test
Bookmarks