How to give permission to a script file inside a deb?
I'm making a theme packaged on deb.
The theme require to modify some files inside /usr/share/themes/base/meegotouch. It modifies succesfully those file s when i add the script to the posinst file BUT now i want to modify that files by a desktop icon that run an SH script that run commands like /sbin/initctl restart xsession/mthome or symlink inside /usr/share/themes/base/meegotouch/libmeegotouchhome/style but these ones doesn't work. I don't have permission? I tried chmod +x script.sh on the postinst but no luck Maybe the script should be placed in other folder? (now is in /opt/theme) |
Re: How to give permission to a script file inside a deb?
I guess you need to be root user so try run commands with sudo.
|
Re: How to give permission to a script file inside a deb?
but if you run commands in sudo the user must enter the password?
and why this script is working when is inside the postinst but not in the script.sh? |
Re: How to give permission to a script file inside a deb?
You need to put a file "myApp.sudoers" into /etc/sudoers.d/
with a content like Quote:
Then you may call the script with sudo without requiring a password. --edit This guide is only valid for normal debian based systems. For Harmattans cripped aegisfs there needs to be obeyed a few things more ... |
Re: How to give permission to a script file inside a deb?
sorry for be insisten but why this script is working when is inside the postinst but not in the script.sh?
|
Re: How to give permission to a script file inside a deb?
postinst is executed as root.
Did you try to run the script with sudo or as root? |
Re: How to give permission to a script file inside a deb?
So.. if i execute this: ln -s /opt/mytheme /usr/share/themes
With sudo would be: Code:
sudo ln -s /opt/mytheme usr/share/themes |
Re: How to give permission to a script file inside a deb?
Quote:
I tried to add sudo in the desktop icon too but nothing..:confused: Code:
[Desktop Entry] |
Re: How to give permission to a script file inside a deb?
Instead of guessing around: what exactly is not working? Which errors?
What is the content of your script? Forgot the shebang? Does the script work when executed as root? ??? |
Re: How to give permission to a script file inside a deb?
Sorry i forgot to answer that..
Yes is working manually via terminal with root |
All times are GMT. The time now is 05:54. |
vBulletin® Version 3.8.8