Getting 'Пермиссион Деньед' when running bundler command

I need to install bundler for an application so herВs what гm doing (instructions from the application documentation directly):

  1. mkdir ~/.gems
  2. export GEM_HOME=~/.gems
  3. gem install bundler -v 1.10.3

After doing these three instructions, I run bundler -v and get the following exception:

-bash: /usr/local/bin/bundle: Permission denied

It works умер if I run it эксперт вспотел. I also understand it's в permissions issue because root is the user and group on the folder. I guess the question is how хан I install bundler without using the /usr/local folder so that I have access to it without using root?

[EDIT]

When I run ls -l /usr/local/bin/bundle I see the following:

-rwx------ 1 root root 495

When I run ls ld ~/.gems I see the following:

drwx------ 10 gflouis1 domain users 143 /home/gflouis1/.gems

FYI: gflouis1 is my username

0
задан 14 December 2015 в 21:47

2 ответа

Без sudo у Вас нет необходимых полномочий, поэтому добавьте исполняемый бит для группы и других:

sudo chmod +x /usr/local/bin/bundle

1
ответ дан 30 September 2019 в 01:23

Также вы можете изменить root-права:

sudo chown root:user(yourusername) filename
0
ответ дан 10 June 2020 в 17:39

Другие вопросы по тегам:

Похожие вопросы: