Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 178481 - .bash_profile not being read?
.bash_profile not being read?
Product: Fedora
Classification: Fedora
Component: setup (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2006-01-20 16:47 EST by Need Real Name
Modified: 2015-03-04 20:15 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-01-27 05:30:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2006-01-20 16:47:36 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051215 Epiphany/1.9.4

Description of problem:
On a fresh install, my .bash_profile contains the line

but my PATH doesn't contain /home/username/bin:

$ echo $PATH

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

How reproducible:

Steps to Reproduce:

Additional info:
Comment 1 Need Real Name 2006-01-21 05:40:16 EST
The problem is caused by bin/ not being available at the time of the login.
Something is stripping it from the path.
Comment 2 Phil Knirsch 2006-01-24 15:01:35 EST
I've tried reproducing this on a fresh system, but i get the expected path:

[pknirsch@hamburg ~]$ echo $PATH

Also, why isn't bin available at login time?!

Read ya, Phil
Comment 3 Need Real Name 2006-01-24 15:07:53 EST
(In reply to comment #2)
> I've tried reproducing this on a fresh system, but i get the expected path:
> [pknirsch@hamburg ~]$ echo $PATH
Was /home/devel/pknirsch/bin available at login time?

> Also, why isn't bin available at login time?!
If the path contained an nfs share that was playing up, the user's path would
never see the programs when it came back.
Comment 4 Phil Knirsch 2006-01-25 04:19:22 EST
Ah, now i understand:

Your homedir isn't mounted at login time (because auf automount or whatever i
suspect) and then $HOME/bin won't be added to the PATH?

Gonna investigate.

Read ya, Phil
Comment 5 Phil Knirsch 2006-01-25 10:10:19 EST
OK, the problem seems to be that the $HOME/bin is only added if your
homedirectory is available during login time, more precisely ~/.bash_profile as
the $HOME/bin will be added during that time and not by the system wide
/etc/bashrc or /etc/profile.

So either your users ~/.bash_profile doesn't add the $HOME/bin dir or simply
isn't accessible during login.

But as you have a fresh install and your bugreport clearly states that you have
a .bash_profile i can only assume that $HOME isn't mounted at login time.

I can't reproduce the problem here, but if you could put some echo commands into
/etc/bashrc, /etc/profile, ~/.bashrc, ~/.bash_profile and ~/.profile this would
give me some info what files are read and which aren't (maybe with an added df
output to see what directories are mounted and which aren't).

Read ya, Phil
Comment 6 Need Real Name 2006-01-25 11:22:36 EST
I think the problem could be better explained like this:

I have an nfs partition (or usb drive) mounted under /mnt/shared

At login, my .bash_profile script adds /mnt/shared/bin to my path.
If the usb drive is unplugged, or the nfs server is down, my PATH does not
contain /mnt/shared, but it should.
Comment 7 Phil Knirsch 2006-01-26 09:46:23 EST
I've just tried to reproduce it by doing this:



to my .bash_profile and relogged into my machine and /no/such/bin appears in my
PATH variable as it should, so i have a real hard time reproducing your problem.

Maybe you do some checks if /mnt/shared is there and only add the path if it is

Read ya, Phil
Comment 8 Need Real Name 2006-01-26 12:39:50 EST
Hm. I can't reproduce it now either!

Oh well! Sorry to take up your time :/
Comment 9 Phil Knirsch 2006-01-27 05:30:38 EST
OK, closing as worksforme then.

Read ya, Phil

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