bash: /home/user/.bashrc: Permission denied when try to change user from root to user

5,088

actually problem was about /home/* files, they owner of all files had changed due to execution of a wrong shell, so it solved by changing permissions of /home/* with a simple bash script.

Share:
5,088

Related videos on Youtube

Mairon
Author by

Mairon

Just curious, Love linux and c

Updated on September 18, 2022

Comments

  • Mairon
    Mairon over 1 year

    I'm on centos, when I login as root and use su x to change user to x, it shows this:

    bash: /home/x/.bashrc: Permission denied

    I try to source ~/.bashrc but nothing changes and I also tried following the instructions at this link.

    I also can't ssh to user x.

    How can I fix this?