Perl wird als www-data ausgeführt

  • Hallo,


    zur Zeit teste ich die Version 1.1.0-rc4.1 auf Ubuntu 12.04.3 (64bit) um in Zukunft einmal von Plesk wegzukommen.


    Installiert habe ich mit php-fpm.


    Jetzt mein Problem. Scripte unter cgi-bin (zum automatischen anlegen von Ordner und Dateien) werden mit dem User des Webservers (www-data) angelegt.


    Suexec wurde vom Installer nicht mitinstalliert. Hab ich was übersehen oder ist das bei der fpm Version so? Gibt es da evtl. eine Lösungsmöglichkeit?


    Vielen Dank


    ShortSnow

  • Hello ;


    Suexec is not needed with PHP-FPM.


    BTW: The cgi-bin directory is created with customer unix user:


    Code
    1. root@wheezy:~# ls /var/www/virtual/laurent.nuxwin.com/ -la |grep cgi-bindrwxr-x--- 2 vu2003 vu2003 4096 sept. 20 03:30 cgi-bin


    Edit:


    I've tested and it's work well. I've created the following test script in the cgi-bin directory:


    index.cgi

    HTML
    1. #!/usr/bin/pythonprint "Content-type: text/html"printprint "<html>"print "<center>Hello!</center>"print "</html>"


    With the following permissions:


    Code
    1. root@wheezy:/var/www/virtual/laurent.nuxwin.com/cgi-bin# ls -latotal 12drwxr-x--- 2 vu2003 vu2003 4096 oct. 4 09:27 .drwxr-x--- 12 vu2003 vu2003 4096 sept. 29 15:46 ..-r-xr-x--- 1 vu2003 vu2003 120 oct. 4 09:30 index.cgi


    Then, when I reach /cgi-bin/index.cgi, I get:


    Code
    1. Hello!


    I'll surely add suexec for the cgi scripts because currently (when using PHP-FPM server implementation), the cgi scripts are run using the Web server user (www-data), which is in the customer group (here vu2003).

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

    Edited once, last by Nuxwin ().

  • Edit: TIcket created. See http://trac.i-mscp.net/ticket/926

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206


  • I'll surely add suexec for the cgi scripts because currently (when using PHP-FPM server implementation), the cgi script are run using the Web server user, which is in the customer group (here vu2003).


    Thanks, yes this is my problem. I have a Perl Scipt (Filemanager). All Scripts are in /cgi-bin with user (i e. vu2003), but if try to make a new file in htdocs the file are from www-data and not vu2003.


    Best wishes


    ShortSnow
    [hr]


    Edit: TIcket created. See http://trac.i-mscp.net/ticket/926


    Oh, ok. Thank you. Very nice.


    best wishes


    ShortSnow

    Edited once, last by ShortSnow ().

  • Thanks, yes this is my problem. I have a Perl Scipt (Filemanager). All Scripts are in /cgi-bin with user (i e. vu2003), but if try to make a new file in htdocs the file are from www-data and not vu2003.


    Best wishes


    ShortSnow


    Re ;


    Needed changes will be in Git Master in few minutes and part of next release 1.1.0-rc5, which will be the last RC before next stable.


    Thank you for using i-MSCP

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

    Edited once, last by Nuxwin ().

  • Tested with Git Version.


    Works perfekt now with my perl scripts.


    Thanks a lot and resepct for the fast an good support.


    Best regards


    ShortSnow