M BUZZ CRAZE NEWS
// news

Can I give the default user that runs Perl scripts from cgi-bin different permisions?

By Joseph Russell

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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy