我只是从源安装nginx
但是当运行/etc/init.d/php_cgi start ,会有一条消息:
Starting php-cgi: spawn-fcgi: can't find user name nginx
…我不知道他们的许可。
以前我用yum (CentOS)安装nginx,
这将创build用户并将其shell设置为/bin/false因此没有人可以以此用户身份启动交互式login。
$ useradd -s /bin/false nginx
尝试
$ sudo adduser --system --no-create-home --user-group --disabled-login --disabled-password nginx
要么
$ sudo adduser --system --no-create-home --user-group -s /sbin/nologin nginx
在Ubuntu上,你可以使用这个命令:
adduser --system --no-create-home --shell /bin/false --group --disabled-login nginx