Bug 24500 - ~/.profile needs +x permission
Summary: ~/.profile needs +x permission
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: bash   
(Show other bugs)
Version: 7.0
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2001-01-21 12:11 UTC by Dimitri Papadopoulos
Modified: 2007-04-18 16:30 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-01-21 12:11:53 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

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

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.

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