/var/www as NFS mount works fine, but protected folders do not

Discussion in 'Installation/Configuration' started by hotmifi, Sep 3, 2023.

  1. hotmifi

    hotmifi New Member HowtoForge Supporter

    When mounting /var/www as an NFS share, everything works fine except »protected folders«.
    I can create the protected folder in ISPConfig 3.2.11 without problem, but when trying to access it I get:
    ERROR 403 - Forbidden!
    You are not permitted to access the requested URL.
    Please contact the webmaster with any queries.

    with this error message in the log:
    [Sun Sep 03 15:52:51.531955 2023] [core:crit] [pid 555992:tid 139637727110720] (13)Permission denied: [client 192.168.170.46:48824] AH00529: /var/www/clients/client0/web3/web/wasserfest/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/clients/client0/web3/web/wasserfest/' is executable
    But the permissions are correct:
    total 11M
    drwxr-xr-x 2 web3 client0 4,0K Sep 3 15:42 .
    drwx--x--x 10 web3 client0 4,0K Sep 3 15:41 ..
    -rwxr-x--x 1 web3 client0 209 Sep 3 15:41 .htaccess
    -rwxr-x--x 1 web3 client0 124 Sep 3 15:41 .htpasswd

    I am lost how to proceed. Anybody any idea?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. till

    till Super Moderator Staff Member ISPConfig Developer

    See explanation:

    https://www.xkyle.com/solving-the-n...e to a limitation in,groups ids can be listed.

    Apache runs as www-data user and group and it is a member of the webX group of the site to be able to access file like images but also the .htaccess file.
     
    ahrasis likes this.
  4. hotmifi

    hotmifi New Member HowtoForge Supporter

    Thanks! Indeed:
    After changing the group membership as follows:
    -rwxr-x--x 1 web3 www-data 266 Sep 3 16:05 /var/www/oo7.ovh/web/wasserfest/.htaccess
    -rwxr-x--x 1 web3 www-data 124 Sep 3 15:41 /var/www/oo7.ovh/web/wasserfest/.htpasswd

    everthings works as planned.
    How persistant will this change be?
     
  5. hotmifi

    hotmifi New Member HowtoForge Supporter

    It looks like a bug in NFS:
    cat /etc/group|grep www-data
    www-data:x:33:
    ispapps:x:5003:www-data
    ispconfig:x:5004:www-data
    client0:x:5005:www-data

    www-data ist member of 4 groups only, which is far less than the RPC limit of 16.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    It will not change unless you alter website protection in ISPConfig e.g. by adding another user.
     
  7. hotmifi

    hotmifi New Member HowtoForge Supporter

    Thanks. A workaround I can live with.
     

Share This Page