- Plesk for Linux
JSP script cannot list a directory or upload any files into it.
Manual listing via CLI returns the following error:
[root@server httpdocs]# sudo -u tomcat ls /var/www/vhosts/example.com/httpdocs/Organisations/AU00000004/Programs/O-00000453
ls: cannot access /var/www/vhosts/example.com/httpdocs/Organisations/AU00000004/Programs/O-00000453: Permission denied
File permissions to the directory are the following:
[root@server httpdocs]# ls -ld /var/www/vhosts/example.com/httpdocs/Organisations/AU00000004/Programs/O-00000453
drwxr-xr--. 4 ekb psacln 4096 May 2 17:16 /var/www/vhosts/example.com/httpdocs/Organisations/AU00000004/Programs/O-00000453
Group membership of the user tomcat is the following:
[root@server httpdocs]# id tomcat
uid=91(tomcat) gid=91(tomcat) groups=91(tomcat)
tomcat is not allowed to list the directory/write to the directory.
Grant tomcat user required permissions with ACL:
# getfacl -R /var/www/vhosts/example.com/httpdocs/ > /root/permbackup
# setfacl -R -m u:tomcat:rwx /var/www/vhosts/example.com/httpdocs/