Bug 24500

Summary: ~/.profile needs +x permission
Product: [Retired] Red Hat Linux Reporter: Dimitri Papadopoulos <dpo>
Component: bashAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: low Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-01-21 12:11:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dimitri Papadopoulos 2001-01-21 12:11:50 UTC
Hi,

Using the /bin/bash shell and a ~/.profile with the following permissions
	-rw-r--r--    1 papadopo papadopo      492 Jan 21 11:40 .profile
I get the following error message and ~/.profile is not executed
	bash: /home/papadopo/.profile: Permission denied
I do have a .bash_profile file as well
	-rw-r--r--    1 papadopo papadopo      230 Jan 13 23:27 .bash_profile
Running chmod +x ~/.profile fixes the problem. However this is not needed
for /etc/profile
	-rw-r--r--    1 root     root          567 Jun 11  2000 /etc/profile

This is unconsistent and the man page does not mention it
       When  bash is invoked as an interactive login shell, or as
       a non-interactive shell with the --login option, it  first
       reads and executes commands from the file /etc/profile, if
       that file exists.  After reading that file, it  looks  for
       ~/.bash_profile,  ~/.bash_login,  and  ~/.profile, in that
       order, and reads and executes commands from the first one
       that  exists and is readable.

Comment 1 Dimitri Papadopoulos 2001-01-21 12:30:22 UTC
Aaargh, forget it!

This happens to an account which has a non-default broken ~/.bashrc which
is executed by ~/.profile and tries to execute ~/.profile again!

Sorry about that.