I recently moved a typo3 9lts instance from a managed server to a rootserver with linux plesk onyx. It seems to work fine, except the image won’t render although they are there. I get a ‘HTTP/2 403 Forbidden 21ms’ error So I assume its a permission issue. If I look at an image e.g.
/fileadmin/_processed_/2/9/csm_typo3-book-backend-login_af97155c7b.png
… and compare the path, I have the following permission set for the managed server (MS) and root server (rs):
fileadmin
MS: rwx rwx r-x
RS: rwx r-x r-x
_processed_
MS: rwx r-x ---
RS: rwx r-x ---
2
MS: rwx rwx r-x
RS: rwx r-x r-x
9
MS: rwx rwx r-x
RS: rwx r-x r-x
csm_typo3-book-backend-login_af97155c7b.png
MS: rw- rw- r--
RS: rw- r-- r--
What do I need to do to render the images again? And if I need to change the permission what’s the best way to I do that?
2
Answers
Re-render images
You can use the InstallTool (Maintenance › Remove Temporary Assets) to re-render images.
Permissions
You should think about a permission concept that fits your use case.
I’ll just suggest how I do it – there are many other ways that are equally possible.
Find out which usergroup your webserver uses
Put the user that is changing files into the same group
That might be the user(s) that you use for deployment to the server, the user an FTP-daemon runs on, …
Set user/group/permissions on the web app directory
This also sets the setgid-bit on directories which means that newly created subdirectories will have the same group.
Make sure new files do also get created with these permissions
Check that new files created by your user (or FTP daemon, or …) will give full permissions to the group!
If it is wrong (commonly found: 0022), set it with
umask 0002
. The easiest to persist is usually to set it in /etc/profile or ~/.bashrc.Also make sure TYPO3 gives full write permissions to the group and sets the setgid:
Checks
Log out and back in again.
This should be a safe setup that is very resilient against running into permission problems. It allows direct upload from an IDE. It allows files to be changed by multiple users/daemons.
First you should try clear TYPO3 maintenance > flush cache , remove temp file , process file, give required permissions , check other issues and then Try to fix with permission , some time major problems solved by backend flush cache ..