问题原文
原帖链接 · automatix · CC BY-SA 4.0
I'm setting up a SLES 12 system for running web applications on it. There is already a /srv/www folder and it's owned by root. So I'm going to reassign it to another user.
Is there a good practice / standard in Suse Linux Enterprise Server, what user should own the web root (and it's files and sub-folders recursively)? In Ubuntu e.g. this user is www-data. Is it applicable to SLES? Or should the Apache user wwwrun be the owner of the web root? Or maybe another special user?
已采纳解答
原帖链接 · aardbol · CC BY-SA 4.0
Who's the owner of the folder doesn't really matter as long as it's not the same user as the http server is running under, which is probably wwwrun on SUSE (better double check that). Because otherwise all your folders and file would be writable by Apache and that would be a big security hole. What matters is that all the files and folders are not writable by other users, because that would be the same as the already mentioned situation.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
