gpt4 book ai didi

ruby-on-rails - ubuntu 用户和 ssh 登录权限被拒绝消息

转载 作者:行者123 更新时间:2023-12-04 18:32:15 27 4
gpt4 key购买 nike

我使用 ubuntu 14.04 来设置我的应用程序环境。安装 rbenv - ruby​​ +rails,nginx + 乘客,全部完成。

但是当我想创建一个 depoly 用户时
有事吗!当我注销并使用 john 登录时(我登录成功),我收到以下消息,我是否更改了某些设置?我只是登录,而不是创建文件夹,所以这个消息很困惑,我现在没有权限(比如 rails -v,ruby -v ......等),
但我仍然可以使用 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

最佳答案

您的 rbenv 安装已损坏。完全卸载它:

rm -rf `rbenv root`

然后使用本地安装重新安装 rbenv(使用部署者用户),查看 rbenv 站点以获取说明:

https://github.com/sstephenson/rbenv#installation

您生成的文件夹应该是/home/deployer/.rbenv 而不是/usr/local/rbenv。

关于ruby-on-rails - ubuntu 用户和 ssh 登录权限被拒绝消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31770614/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com