Bug 57072 - su : bash: /root/.bashrc: Permission denied
Summary: su : bash: /root/.bashrc: Permission denied
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: sh-utils
Version: 7.1
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-12-04 10:42 UTC by Alain Spineux
Modified: 2007-04-18 16:38 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2003-03-10 17:57:41 UTC


Attachments (Terms of Use)

Description Alain Spineux 2001-12-04 10:42:13 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010917

Description of problem:
[root@daryl /tmp]# su asx -c "/bin/ls /"
bash: /root/.bashrc: Permission denied
bin   cdrom  dev   etc	 lib	     misc  opt	 root  s2    tmp  var
boot  d2     dosa  home  lost+found  mnt   proc  s1    sbin  usr  


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
Just use the su command
[root@daryl /tmp]# su asx -c "/bin/ls /"


Actual Results:  I get an error message :
bash: /root/.bashrc: Permission denied
And then the correct result
bin   cdrom  dev   etc	 lib	     misc  opt	 root  s2    tmp  var
boot  d2     dosa  home  lost+found  mnt   proc  s1    sbin  usr 

Expected Results:  no error message ! 
bash: /root/.bashrc: Permission denied

Additional info:

What is very strange is to use wrong argument !
[root@daryl /tmp]# su asx azerty
bash: /root/.bashrc: Permission denied
azerty: azerty: No such file or directory

the .bashrc is read before to test everything.
if you get read access to user asx to /root/.bashrc, su
will execute its content before to execute the command
The bug appends in the 6.2 and 7.2 too

Comment 1 Bernhard Rosenkraenzer 2002-08-29 20:03:49 UTC
Not reproducable with 2.0.12-3.



Note You need to log in before you can comment on or make changes to this bug.