2
votes
1answer
860 views

How do I get simple scripts which seem to need root priveliges to run via the www-data user?

I am programming a small webinterface to control samba on Debian (kernel 2.6.32-5-686). I started by writing simple scripts to add users, create folders, etc. They worked fine when run as root. ...
4
votes
4answers
608 views

How to add a line to a file which has only root write permission and to continue the script execution

I am trying to learn bash scripting. I am working on a practical problem and at one point I need to add a line to a file which requires root permission to write. The code looks like this: # some ...