我使用ubuntu 14.04来设置我的应用程序环境。安装rbenv - ruby + rails,nginx + passenger,全部完成。
但是当我想创建一个depoly用户时 有问题!当我注销并使用john登录(我成功登录)时,我收到了以下消息,是否更改了某些设置?我只是登录,而不是创建文件夹,所以这些消息太混乱了,我现在没有权限(比如rails -v,ruby -v ......等), 但我仍然可以使用sudo来做像 sudo visudo
这样的事情Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-48-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Sun Aug 2 17:23:20 CST 2015
System load: 0.0 Processes:
Usage of /: 9.3% of 19.55GB Users logged in: 1
Memory usage: 2% IP address for eth0:
Swap usage: 0%
Graph this data and manage this system at:
https://landscape.canonical.com/
Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud
*** System restart required ***
Last login: Sun Aug 2 17:23:21 2015 from ip.dynamic.hinet.net
mkdir: cannot create directory ‘/usr/local/rbenv/shims’: Permission denied
mkdir: cannot create directory ‘/usr/local/rbenv/versions’: Permission denied
mkdir: cannot create directory ‘/usr/local/rbenv/shims’: Permission denied
mkdir: cannot create directory ‘/usr/local/rbenv/versions’: Permission denied
mkdir: cannot create directory ‘/usr/local/rbenv/shims’: Permission denied
mkdir: cannot create directory ‘/usr/local/rbenv/versions’: Permission denied
mkdir: cannot create directory ‘/usr/local/rbenv/shims’: Permission denied
mkdir: cannot create directory ‘/usr/local/rbenv/versions’: Permission denied
这是我的用户设置:
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
john ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
答案 0 :(得分:1)
您的rbenv安装已损坏。完全卸载它:
rm -rf `rbenv root`
然后使用本地安装重新安装rbenv(使用部署用户),查看rbenv网站获取说明:
https://github.com/sstephenson/rbenv#installation
您生成的文件夹应为/home/deployer/.rbenv而不是/ usr / local / rbenv。