SU'ing to user and getting ".bashrc permission denied"
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
SU'ing to user and getting ".bashrc permission denied"
After installing LimeWire I started getting weird permission errors on
my home account. Root is fine, but when I log in as a user, I am getting, bash: /home/chris/.bashrc: Permission denied
Im frustration I did a chmod -R o+wrx /home/chris
and I still get the errors, cannot even startX now as the user.
I have no idea how install limewire changed my permissions, but how do I restore that?
hello :-)
perhaps you haven't select the shell for your user.
you can do it by loggin in root, running kuser, and selcting the user detail and making sure that the login shell in selected /bin/bash.
The selected shell for the user is bash. It was working perfectly until I installed a new piece of software. Also typing bash at the prompt gives the same message.
There never was a .bashrc file. I dont think the problem is with any file named .bashrc but somehow its with the profile being loaded up. For fun I created a .bashrc file. Here is what happens.
ls -al .bashrc
-rwxrwxrwx 1 chris root 0 2006-11-22 00:21 .bashrc*
su chris
bash: /home/chris/.bashrc: Permission denied
touch test
touch: cannot touch `test': Permission denied
Looks fun huh?
Somehow the user is not being given permissions for the shell and everything else it looks like. X wont work either for permission reasons.
d-w----rwx 13 chris users 4096 2006-11-22 09:30 ./
The permissions for your home directory are reversed.
In the permissions list (bolded), spots 2-4 are the owner permissions, 5-7 are the group permissions, and 8-0 are everyone else's permissions. The owner only has write permissions, not read, while everyone else has full control. Try this:
Code:
chmod -R 740 /home/chris
That should fix the touch problem at least. Change the numbers to 744 if you want to allow everyone to read things in your home directory.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.