Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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 | 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

2 Answers 2

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 0 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.