大网数据广告活动
服务器运维问答

Which user should be the owner of the web root in SLES 12?

· 52CE 我爱测

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 Enterp…

问题原文

原帖链接 · 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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-01-06)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。