![]() |
Re: How to use root within script/program?
Quote:
I tried Code:
sudo /usr/bin/run-standalone.sh /opt/script.sh Code:
standalone.sh: line 11: /opt/script.sh:permission denied. |
Re: How to use root within script/program?
Quote:
Quote:
|
Re: How to use root within script/program?
Quote:
|
Re: How to use root within script/program?
as root
chown root YOURFILE chmod 4775 YOURFILE voila! |
Re: How to use root within script/program?
Quote:
What I want is, after instaling the deb file, the users should be able to start the app normally but it should have root priviledges. For refrerence, this are the scripts that I am planning to make into a package. So, while creating the deb file, in the .desktop file, for exec=, what command should I give? Right now i tried with Code:
sudo run-stanalone.sh /opt/script.sh Am I doing something glaringly obvious and dumb here? |
Re: How to use root within script/program?
OK, i have finally figured out how to run some of scripts as root, when started by user.
I have a bunch of 5 scripts, with a main script acting as the menu or gateway. The main script is launched normally via an icon as Code:
sh parentscript.sh Code:
sudo run-standalone.sh sh childscript1.sh Can anybody help us? |
Re: How to use root within script/program?
There's another method that works great which I saw based on this:
http://talk.maemo.org/showpost.php?p...1&postcount=16 From the above link (disable_ts.zip) If you put this in a script file: Code:
sh -c 'echo "sleep 1; echo 1 > /sys/devices/platform/omap2_mcspi.1/spi1.0/disable_ts" | sudo gainroot' |
Re: How to use root within script/program?
Hey thanks a lot! piping the command to sudo gainroot works like a charm!
|
Re: How to use root within script/program?
Quote:
|
Re: How to use root within script/program?
Setting permissions in the postinst is a band-aid. The correct permissions should already have been in the packed deb, i.e. the permissions should preferably be set in debian/rules or other makefile/buildscript, not in the package postinst.
|
All times are GMT. The time now is 14:07. |
vBulletin® Version 3.8.8