在/etc/sudoers我需要为此命令授予无密码sudo:
/usr/bin/env sudo ln -nfs /home/deployer/apps/myapp_staging/shared/config/nginx.conf /etc/nginx/sites-enabled/
到deployer用户。
我尝试了以下没有成功:
deployer ALL=(ALL) NOPASSWD: /etc/nginx/sites-enabled/
less了什么东西?
该命令本身丢失。 尝试
deployer ALL=(ALL) NOPASSWD: /bin/ln -nfs /home/deployer/apps/myapp_staging/shared/config/nginx.conf /etc/nginx/sites-enabled/