Running as www-data gives the problem that I cannot open the rtorrent screen to check on my downloads. It works this way already. But I need to be able to access that screen.
Giving www-data permissions to kill a process would only solve a part of the problem. Is there a way www-data could execute rtorrent as my user in the script? Rishab Arora #### If the world were a linux terminal http://www.arthiktangi.com/?p=391 #### On Fri, Jun 3, 2011 at 11:04 PM, satyaakam goswami <[email protected]>wrote: > On Fri, Jun 3, 2011 at 9:38 PM, Rishab Arora <[email protected]> wrote: > >> Hi All, >> I'm trying to build a web based interface to pause rtorrent on my Ubuntu >> Server for 30 minutes every time a person clicks a button. >> >> I'm trying to build this so that my neighbour (who shares my net >> connection) or any other member of my family can surf the web without >> rtorrent hogging up all the bandwidth. But they can't handle an ssh >> connection. >> >> This is what I've done so far: >> >> A python cgi script is executed on clicking a link and then, >> - If rtorrent is not running, it does nothing >> - If rtorrent is running, it executes "kill -2 'pid'" and then "sleep >> 1800;screen -d -m rtorrent" >> >> This actually does the job. >> The problem with my solution is that the rtorrent process then needs to >> belong to the user "www-data" for apache to be able to kill it. >> >> And if this happens, i can't access the screen executing the rtorrent, and >> hence, cannot monitor my downloads. >> >> Any suggestions? >> >> > run rtorrent as www-data user or add a sudo rule with the command for your > user > > -Satya > > -- > Mailing list guidelines and other related articles: > http://lug-iitd.org/Footer > -- Mailing list guidelines and other related articles: http://lug-iitd.org/Footer
