I'm new to Ubuntu
I'm trying to execute an Rscript in PHP using exec. However it doesnt run.
When I run it from the terminal it executes perfectly.
This is the code I run from commandline:
/usr/lib/R/bin/Rscript /home/xin/Documents/ClassificationApp/ClassificationAllInOne.R "http://localhost/categorisation/public/classification/data/1423242832.json"
It works perfectly.
From searching around i can deduce it is a permissions issue as PHP/apache runs as www-data and Rscript is root.
I've tried a number of ammendments to the Sudoers
file none of which worked:-
User_Alias WWW_USER = www-data
Cmnd_Alias WWW_COMMANDS = /usr/lib/R/bin/Rscript, /home/xin/Documents/Classifi$
WWW_USER ALL = (ALL) NOPASSWD: WWW_COMMANDS
This hasn't worked. I've spent a day messing around with various combinations. It's driving me mad.
Any inspiration would be most welcome
M