when you su to testuser, you are probably still in the root's home folder.  If so, 
does the testuser account have permissions to the root user's folders?  If you have 
not set this up manually, then the script will not be able to read root's .bashrc file 
(which is in the current directory so will be the one used).  I would assume then that 
even though the .bashrc file can't be read, a default is then used so that bash can 
still continue to work.

If you were to do a "cd ~" after su'ing to testuser, you should then be in the 
testuser's home.  Try your test there.

Hope this helps (and that I'm not too far off the mark on my response).

Shawn


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Pete
Sent: Friday, April 30, 2004 4:35 PM
To: CLUG General
Subject: [clug-talk] BASH & permissions



Hi all :

Got a problem with bash on a new Fedora Core 1install.

When I execute my script (clientLogin) as root there is no problem
when I su to testuser and execute the script I get :

/bin/bash: /root/.bashrc: Permission denied

Now what has /bin/bash to do with /root/.bashrc ?

Permision overview
-rwxr-xr-x  1 root root 211 Apr 30 16:17 clientLogin

The script it self :
#!/bin/bash
#
echo "My clientLoginScript"

Strange thing is that after the err I get my result...

su testuser
./clientLogin
/bin/bash: /root/.bashrc: Permission denied
My clientLoginScript

Have I nice Week-End

Peter



_______________________________________________
clug-talk mailing list
[EMAIL PROTECTED]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca

_______________________________________________
clug-talk mailing list
[EMAIL PROTECTED]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca

Reply via email to