You are not logged in.
Hi,
when I'm trying to set the thresholds for starting and stopping battery charging with Tp_smapi using sudo receive the message that I don't have the permission to do that.
$ sudo echo 85 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
bash: /sys/devices/platform/smapi/BAT0/stop_charge_thresh: Keine Berechtigung
But when I
$ su -
Passwort:
# echo 85 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
everything works fine. I always thougt with sudo you can do everything root can do. So, this isn't the case?
Thanks for enlighten me
Barghest
Last edited by Barghest (2010-06-04 17:48:39)
Offline
actually sudo echo 85 > /something are two command
sudo echo 85 is one which is running as root and the redirection one the second
Give what you have. To someone, it may be better than you dare to think.
Offline
echo 85 | sudo tee /sys/devices/platform/smapi/BAT0/stop_charge_thresh
the redirection (the >) is ran by your shell which doesn't run as root.
Offline
Edit: too slow.
Last edited by Stebalien (2010-06-04 17:46:17)
Steven [ web : git ]
GPG: 327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com
Offline
wow...this was fast...thanks mates
Offline
you can circumvent that by using echo 85 | sudo tee /sys/...
no place like /home
github
Offline
and you use "tee -a" to append, instead of >>
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline