Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a new user in CentOS 6.3 using this commands

useradd deployer

passwd deployer


then I added this line to file:

deployer ALL=(ALL) ALL


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?

share|improve this question

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.

share|improve this answer
up vote 1 down vote accepted


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!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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