Can I Give the Default User That Runs Perl Scripts from Cgi-Bin Different Permisions?
The Default User That Perl Scripts Run from Browsers Is Www-Data. My Scripts Need Permission to Read/Write/Delete Files in Other Directories. All These...
The default user that Perl scripts run from browsers is www-data. My scripts need permission to read/write/delete files in other directories. All these directories are created within the /home directory (all recursive, i.e. /home/Daniel/ftp/files) and these directories and files are created at run time by different users.
Is there a way to give www-data broader authority? Should I change the default user that runs Perl scripts (again from browsers) even though that sounds dangerous?
Thanks
1 Answer
Should anyone come across this I found my answer.
The default user (for Perl/CGI commands) is located in /etc/apache2/envvars
I commented the line out
#export APACHE_RUN_USER=www-data
Replaced it with the user I wanted
export APACHE_RUN_USER=franklin
then after saving the file I restarted the service
sudo service apache2 restart
I should note that even though I am sure it would have been the wrong thing to do, trying to make the default user 'root' produced an error.