TYPO3 9LTS-将实例移动到装有Plesk Onix的Linux根服务器后无法渲染的图像 [英] TYPO3 9LTS - Images won't render after moving instance to a linux rootserver with plesk onyx

查看:30
本文介绍了TYPO3 9LTS-将实例移动到装有Plesk Onix的Linux根服务器后无法渲染的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近使用Linux Plesk Onyx将一个typo39lts实例从受控服务器移到了根服务器。它似乎工作得很好,只是图像不能渲染,尽管它们在那里。我收到一个"HTTP/2403禁止的21ms"错误,所以我认为这是一个权限问题。如果我查看图像,例如

/fileadmin/_processed_/2/9/csm_typo3-book-backend-login_af97155c7b.png

..。并比较路径,我为受控服务器(MS)和根服务器(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--

我需要做什么才能再次渲染图像?如果我需要更改权限,最好的方法是什么?

推荐答案

重新呈现图像

您可以使用InstallTool(维护>删除临时资产)重新呈现图像。

权限

您应该考虑适合您的使用情形的权限概念。

我只建议我是如何做到这一点的-还有许多其他同样可能的方法。

了解您的Web服务器使用哪个用户组

# search for php-fpm (or apache, or nginx, ... depending on which process runs PHP when accessed via the web on your server)
sudo ps -o command,user,group -p $(pgrep php-fpm)

将正在更改文件的用户放入同一组

这可能是您用于部署到服务器的用户、运行FTP守护程序的用户.

sudo usermod -a -G WEBSERVER_GROUP YOUR_USERNAME

设置Web应用目录上的用户/组/权限

cd YOUR_APP_ROOT_DIR # e.g. /var/www/my_typo3
sudo chown -R WEBSERVER_USER:WEBSERVER_GROUP .
sudo find . -type f -exec chmod 660 {} ;
sudo find . -type d -exec chmod 2770 {} ;

这还会在目录上设置setgid位,这意味着新创建的子目录将具有相同的组。

确保也使用这些权限创建新文件

检查由您的用户(或FTP守护进程,或.)创建的新文件将授予该组完全权限!

umask
# that should start with 000 - e.g. 0002 is OK, 0007 would be most secure

如果错误(通常发现:0022),则使用umask 0002进行设置。最容易持久化的通常是将其设置在/etc/profile或~/.bashrc中。

还要确保TYPO3授予组完全写入权限并设置setgid:

# In LocalConfiguration.php: (or wherever you set your TYPO3 configuration):
SYS/fileCreateMask = '0660' # you can ignore the last digit, 0 for maximum security
SYS/folderCreateMask = '2770' # you can ignore the last digit 

检查

注销,然后重新登录。

umask # should be 000x
groups # should include the webserver group

# create files and folders with your user 
# create files and folders in TYPO3 "File List" module and check permissions

这应该是一个安全的安装程序,对于遇到权限问题非常有弹性。它允许从IDE直接上传。它允许多个用户/守护程序更改文件。

这篇关于TYPO3 9LTS-将实例移动到装有Plesk Onix的Linux根服务器后无法渲染的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆