How to set user for cgi scripts in ispconfig?

Discussion in 'ISPConfig 3 Priority Support' started by pvanthony, Jan 29, 2026 at 12:50 PM.

  1. pvanthony

    pvanthony Active Member HowtoForge Supporter

    Currently I have a perl web application. When it is trying to send email using sendmail binary it is doing it as user www-data. I would like it to be the user set by ispconfig like web123.
    Here is the configuration in nginx that is working fine but I need it to be using user web123 or the respective user set by ispconfig for each web hosting.
    Code:
            location ~ ^/.*\.pl$ {
                        try_files $uri =404;
                        include /etc/nginx/fastcgi_params;
                        root /var/www/clients/client1/web123/cgi-bin/perl_application;
                        gzip off;
                        fastcgi_pass  unix:/var/run/fcgiwrap.socket;
                        fastcgi_index index.pl;
                        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                        fastcgi_intercept_errors on;
            }
    
    Need advice on how to achieve this.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess you will likely have to set up a fcgiwrap. This might help you:

     
    pvanthony likes this.
  3. pvanthony

    pvanthony Active Member HowtoForge Supporter

    Yes!!!
    This really helped me very much.
    It is working great now!!!
    Code:
    sudo systemctl start fcgiwrap-web123.service
    For the above command, should I also do a enable like
    Code:
    sudo systemctl enable fcgiwrap-web123.service
    so that it will work after a reboot?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, that's probably good.
     
    pvanthony likes this.

Share This Page