【问题标题】:apache port 80 non rootapache 80端口非root
【发布时间】:2011-08-14 05:23:26
【问题描述】:

我知道不推荐使用 apache 端口 80 作为非 root 用户,因为我知道不建议使用 1024。

【问题讨论】:

  • 不能,Linux 系统不允许将套接字绑定到端口 1024 以下。使用高于端口 1024 或以 root 身份启动 Apache 守护程序的实际问题是什么?
  • 当我无法以 root 身份运行时,我使用 50008080。你为什么不以 root 身份运行...?
  • 如果我启动 apache 作为守护进程,它会解决我的问题吗?
  • @user665319:你可能应该使用 init.d 脚本或apache2ctl 启动 Apache,如果你的系统有它的话......用户 Apache 运行由 UserGroup 控制配置文件中的指令......说了这么多,你的问题是什么?您对您所在的服务器没有 root 访问权限吗?

标签: apache port root


【解决方案1】:

您在此处描述了几种方法:Running network services as a non-root user。 讨论了使用iptablesauthbindsudo 的可能性。这是 Debian 系统的手册,但它应该为您指明正确的方向。

【讨论】:

  • 不确定这是否真的在“以非 root 用户身份运行”的范围内,因为讨论的所有可能性都需要以 root 用户身份手动设置,并且仍然以 root 身份设置套接字绑定,这与首先​​将 Apache 删除权限授予指定用户并没有太大不同。但是,看到这是一个允许某人以 ACL 控制的方式使用特权端口并且不需要修改 linux 内核源代码的答案,+1
猜你喜欢
  • 1970-01-01
  • 2017-09-21
  • 2014-02-20
  • 2015-08-05
  • 2011-12-14
  • 2014-08-19
  • 1970-01-01
  • 2011-10-24
相关资源
最近更新 更多