2

I created a new user in CentOS 6.3 using this commands

useradd deployer

passwd deployer

visudo

then I added this line to file:

deployer ALL=(ALL) ALL

Fine!

Now I trying to install rbenv, to deploy an RoR application. I followed this steps:

cd /home/deployer

su deployer

curl https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash

It worked. After, I added rbenv to .bashrc and tried to reload .bashrc file and get this error:

[deployer@mycentos ~]$ . ~/.bashrc 
bash: /home/deployer/.rbenv/bin/rbenv: Permission denied

Anyone know why?

1

It looks like you're not getting your environment set correctly when you do su deployer. Try sudo -iu deployer, so that you get the environment of that user as well.

1

Solved!

I was getting this error because /home folder was mounted with noexec option.

$cat /etc/fstab 
...
/dev/mapper/VG00-LVhome /home  ext4    defaults,noexec,nosuid        1 2

Now, I changed app to /usr folder and it works!

Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.