I am using cent OS Operating system without GNOME.

In the starting, it asks

localhost login:

It has one user named service under group name service whose password is also service.

I want to enter in OS by this user named service.

When I do this, it shows this lines

Last Login: Mon Feb 18 16:16:26 on tty1
-bash: /home/service/.bashrc: Permission denied

I changed in /etc/sudoers, and add service ALL=(ALL) ALL, right below root ALL=(ALL) ALL, but it didn't work.

when I try to switch from root to service, it shows the same error.


When I run ls -a -l | grep .bashrc, it shows

lrwxrwxrwx 1 root  root   41 Feb 18 11:40 .bashrc -> /home/service/etc/version.symlink/.bashrc
-rw-r--r-- 1 service service 124 Feb 15 13:06 .bashrc-moved-1361167832

Help me. Looking for your kind response.


Your login as user 'service' seems to be successful. On login, the Bash shell will be loaded, which by default executes ~/.bashrc. But in your case there seems to be something strange with your ~/.bashrc. You also seem to have a file called '.bashrc-moved-1361167832'.

Now I don't know how this happened, but something seems to have moved your original .bashrc away, and replaced it with a link to a file that you can't execute.

I have no idea what has done this and why, but if you want to get rid of it then you could do this as user 'service' in your home dir ~:

sudo rm .bashrc
mv .bashrc-moved-1361167832 .bashrc

This will first remove the link to this alternative file. And then (I guess) restore the original.

Now try to relogin.

  • I remove the .bashrc-moved-1361167832.sh because that is useless. Now tell me how to change the ownership, and this is symlink, see the first line of output of ls.. command – devsda Feb 18 '13 at 11:56
  • What I ment was the following. I guessed that .bashrc-moved-1361167832.sh was your original .bashrc, until something has renamed it. Thats why I suggested you would restore it. To change ownership you have to use chown, but I'm not sure if this will help you. You may try doing chown service ~/.bashrc and see if that helps. – replay Feb 18 '13 at 11:58
  • I resolved this problem , by creating .bashrc in service user, then copy content of above file, then remove above file. This problem resolved. Thanks a lot for taking time for me. – devsda Feb 18 '13 at 13:03

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.