ISPC 3.052 Owner under suphp site is Wrong!

Discussion in 'ISPConfig 3 Priority Support' started by concept21, Jul 19, 2013.

  1. concept21

    concept21 Member

    Help about ISPConfig 3.052!

    Please see my uploaded photo. It is an example showing the web1 public site's statistics directory and owner under suphp mode. As you know, they are not correct. The correct owner should be web1:client1. The same problem happen to all newly created directories under /web1/web/. If the owner setting cannot be corrected, many web software cannot be installed nor run.

    In the ISPConfig 3.046, I could reset the owner correctly by disabling and then enabling web1, but in ISPConfig 3.052, this technique does not work anymore.

    What should I do to correct this problem? :eek:
     

    Attached Files:

  2. till

    till Super Moderator

    The ownership of the above files is correct. The html files are created by awstats and shall be owned by the root user as they shall not be ditable by the web user. This is not related to running or installing any software in the site as the stats folder is a system folder, so website scripts might neither alter nor modify any files in this folder. Website scripts are installed in the /web folder and not in the /web/stats subfolder.

    Regarding suphp: suphp is deprecated and should not be used anymore. The recommended php mode is php-fcgi or php-fpm whith suexec checkbox enabled. This mode will run the scripts php under the owner of the website and is much faster then suphp.
     
  3. concept21

    concept21 Member

    Hi Till,
    You misunderstood.

    The same problem happens to all newly created directories under /web1/web/. How to change these new directory owner from root:root to web1:client1?


    And for the new php mode, which one is more secure: php-fcgi or php-fpm?


    Thanks.
     
  4. till

    till Super Moderator

    How did you create these directories? ISPConfig creates only the directory stats inside the web dir and this directory shall be owned by root as it is system directory. Here is the output of ls that shows folders and files with correct permissions:

    Code:
    root@server1:/var/www/clients/client1/web1/web# ls -la
    total 32
    drwx--x--- 3 web1 client1 4096 Jul 16 07:10 .
    drwxr-xr-x 9 root  root    4096 Jul 16 07:10 ..
    -rwxr-xr-- 1 web1 client1 7358 Jul 16 07:10 favicon.ico
    -rwxr-xr-- 1 web1 client1   26 Jul 16 07:10 .htaccess
    -rwxr-xr-- 1 web1 client1 1861 Jul 16 07:10 index.html
    -rwxr-xr-- 1 web1 client1   14 Jul 16 07:10 robots.txt
    drwxr-xr-x 2 root  root    4096 Jul 16 07:10 stats
    Its the same. The security is done by enabling suexec.
     
  5. concept21

    concept21 Member

    Hi Till,
    Let me show you more pictures. You should be able to understand my problem.

    I upload a file vpn.zip to /web1/web/ and then extract it. It's owned by root (picture 1). All its subdirectories and files are also owned by root (picture 2).

    In ISPConfig 3.046, I could reset the owner correctly to web1:client1 by disabling and then enabling web1 again, but in ISPConfig 3.052, this technique does not work anymore.

    What should I do to correct this problem?
     

    Attached Files:

  6. till

    till Super Moderator

    Ok,now its clear.Thats not a ispconfig problem, the probem is that you uploaded and unpacked the files as root user so the resulting files and foldeer are owned by root. Thats the case on all Linux system and not ispconfig specific.

    There are several ways to ensure that the files are woned by the correct user:

    a) unpack them on your desktop and upload them by FTP with the FTP user of this site.
    b) Upload the zip file with a ssh user of thsi website instead of root and unpack it as this ssh user, the unpacked files will then be owned by the web user.
    c) When you want to upload and unpack them as root, the chown the files after you uploaded them to the correct user:

    chown -R web1:client1 vpn
     

Share This Page