Got an odd Serverpilot query.
My client wants FTP access to a subfolder on the site - loathe to let them have full access so created a user with access to /home/FTPUSER and symlink to this from my /srv/users/serverpilot/apps/APPNAME/public/ folder so that they cannot access the system files for their main site, etc from a script.
PHP files from this folder are working fine but the client now wants to be able to run CGI/Perl scripts from this folder. I have tried following instructions at https://serverpilot.io/community/articles/how-to-create-a-cgi-bin-directory.html (updating the document root) but can’t get CGI or Perl scripts to run, instead being returned as plain text.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
You might need to have that custom user’s home directory somewhere under
/srv/usersdue to that being the suexec root in ServerPilot’s Apache build. That is, maybe Apache is refusing to execute these scripts for security reasons because they’re under
Alternatively, you could give your client access to a specific subdirectory by running a very simple FTP server. Take a look at this article (just added yesterday):
As a former Perl/CGI developer this brings back memories 😃
It’s been a while since I’ve set up apache to run Perl scripts but there are three primary things you’ll need to do:
1.) Make sure that mod_perl is installed and enabled:
2.) In your configuration make sure that the directory where the scripts will be has the
3.) Make sure the scripts have execute permissions for the www-data user that apache runs under.