- Plesk for Linux
JSP script cannot list a directory or upload any files into it.
Manual listing via CLI returns the following error:
# 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:
# 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:
# id tomcat
uid=91(tomcat) gid=91(tomcat) groups=91(tomcat)
tomcat is not allowed to list the directory/write to the directory.
1. Login to Plesk via SSH
2. Grant tomcat user the required permissions:
# getfacl -R /var/www/vhosts/example.com/httpdocs/ > /root/permbackup
# setfacl -R -m u:tomcat:rwx /var/www/vhosts/example.com/httpdocs/