我正在尝试创建一个符号链接,但我得到了许可被拒绝.我怎么说出原因?
ln -nfs /home/deploy/foo/shared/config/Nginx.conf /etc/Nginx/sites-enabled/foo ln: Failed to create symbolic link `/etc/Nginx/sites-enabled/foo': Permission denied
# This file is managed by Chef. # Do NOT modify this file directly. Defaults !lecture,tty_tickets,!fqdn # User privilege specification root ALL=(ALL) ALL deploy ALL=(ALL) ALL # Members of the group 'sysadmin' may gain root privileges %sysadmin ALL=(ALL) ALL # Members of the group 'sysadmins' may gain root privileges %sysadmins ALL=(ALL) ALL
我以一个名为deploy的用户身份登录,我在sysadmins组内.
whoami deploy cat /etc/group deploy:x:1000: sysadmin:x:2300:deploy
我们在评论中讨论过:
你应该使用sudo运行你的ln命令:
sudo ln -nfs /home/deploy/foo/shared/config/Nginx.conf /etc/Nginx/sites-enabled/foo
现在,如果由于Capistrano 3(我不知道)而无法实现这一点,则必须为部署用户提供对文件夹/ etc / Nginx / sites-enabled的写权限.
原文地址:https://www.jb51.cc/ubuntu/347887.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。