Bug 57072 - su : bash: /root/.bashrc: Permission denied
su : bash: /root/.bashrc: Permission denied
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: sh-utils (Show other bugs)
7.1
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-04 05:42 EST by Alain Spineux
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-03-10 12:57:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alain Spineux 2001-12-04 05:42:13 EST
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 16:03:49 EDT
Not reproducable with 2.0.12-3.

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