LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-08-2010, 03:28 AM   #1
nbeayni
LQ Newbie
 
Registered: Oct 2010
Posts: 10

Rep: Reputation: 0
cannot change directory to /home/oracle: Permission denied


Hello all,

I am installing oracle 11g on Oracle enterprise Linux 5 i applied all the steps in doc
http://www.oracle-base.com/articles/...riseLinux5.php

when trying to switch user to user oracle i am facing the below

[root@oel5 ~]# su - oracle
su: warning: cannot change directory to /home/oracle: Permission denied
-bash: /home/oracle/.bash_profile: Permission denied

your help please
 
Old 11-08-2010, 04:33 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Looks like oracle's home directory and/or files are not owned by oracle (and/or group oinstall). Did something go wrong with this part of the instructions?
Quote:
groupadd oinstall
groupadd dba
groupadd oper
groupadd asmadmin

useradd -g oinstall -G dba,oper,asmadmin oracle
passwd oracle
Take a look at the output of: ls -lad /home/oracle/{.*,*} All files and directories should be owned by oracle and have oinstall as group.

If that is not the case you need to change the ownership (as root): chown -R oracle:oinstall /home/oracle

Hope this helps
 
Old 11-08-2010, 05:29 AM   #3
nbeayni
LQ Newbie
 
Registered: Oct 2010
Posts: 10

Original Poster
Rep: Reputation: 0
below is the result of the command

drwxrwxr-x 3 oracle oinstall 4096 Nov 8 11:25 /home/oracle/.
drw-r--r-- 3 oracle oinstall 4096 Nov 8 11:19 /home/oracle/..
-rwxrwxr-x 1 oracle oinstall 33 Nov 8 11:19 /home/oracle/.bash_logout
-rwxrwxr-x 1 oracle oinstall 794 Nov 8 11:25 /home/oracle/.bash_profile
-rwxrwxr-x 1 oracle oinstall 859 Nov 8 11:21 /home/oracle/.bash_profile~
-rwxrwxr-x 1 oracle oinstall 124 Nov 8 11:19 /home/oracle/.bashrc
-rwxrwxr-x 1 oracle oinstall 515 Nov 8 11:19 /home/oracle/.emacs
drwxrwxr-x 4 oracle oinstall 4096 Nov 8 11:19 /home/oracle/.mozilla



still the same error
 
Old 11-08-2010, 05:46 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

This looks wrong: drw-r--r-- 3 oracle oinstall 4096 Nov 8 11:19 /home/oracle/..

That should be drwxr-xr-x 3 root root 4096 Nov 8 11:19 /home/oracle/..

/home should be owned by root and have drwxr-xr-x
/home/oracle should have drwxr-xr-x and be owned by oracle (group: oinstall)

As root do:
Code:
cd /
chown root:root /home
chmod 755 /home
The permissions of the files and directory inside /home/oracle also look incorrect. In general files should have -rw-r--r-- (644) and directories drwxr-xr-x (755)

As root do:
Code:
cd /home/oracle
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
Hope this helps.
 
1 members found this post helpful.
Old 11-08-2010, 06:38 AM   #5
sriramraj
LQ Newbie
 
Registered: Jul 2010
Location: Gurgaon
Posts: 6

Rep: Reputation: 0
That will work

The below command will work
Quote:
Originally Posted by druuna View Post
Hi,

This looks wrong: drw-r--r-- 3 oracle oinstall 4096 Nov 8 11:19 /home/oracle/..

That should be drwxr-xr-x 3 root root 4096 Nov 8 11:19 /home/oracle/..

/home should be owned by root and have drwxr-xr-x
/home/oracle should have drwxr-xr-x and be owned by oracle (group: oinstall)

As root do:
Code:
cd /
chown root:root /home
chmod 755 /home
The permissions of the files and directory inside /home/oracle also look incorrect. In general files should have -rw-r--r-- (644) and directories drwxr-xr-x (755)

As root do:
Code:
cd /home/oracle
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
Hope this helps.
 
Old 11-08-2010, 06:48 AM   #6
nbeayni
LQ Newbie
 
Registered: Oct 2010
Posts: 10

Original Poster
Rep: Reputation: 0
thx it is solved now
 
Old 11-08-2010, 06:55 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Nice it is solved.

Can you put the Solved tag on this thread (it is an option in the Thread Tools pull down menu)?
 
Old 11-08-2010, 07:04 AM   #8
nbeayni
LQ Newbie
 
Registered: Oct 2010
Posts: 10

Original Poster
Rep: Reputation: 0
one more thing.
i have the below
[oracle@oel5 V17489-01]$ ./runInstaller
bash: ./runInstaller: /bin/sh: bad interpreter: Permission denied


where is V17489-01 is the link of the CD/DVD drive of my VMware to an ISO oracle file.
I am not able to run the installation.

Moreover i copied the content of V17489-01 to a Database folder on the oracle user Desktop but still i am facing the below:

[oracle@oel5 Database]$ ls
doc install response rpm runInstaller sshsetup stage welcome.html
[oracle@oel5 Database]$ ./runInstaller
bash: ./runInstaller: Permission denied
 
Old 11-08-2010, 07:13 AM   #9
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

If you run it from the cd (as user oracle): sh runInstaller

Or, but you cannot do this on the cd: chmod 755 runInstaller, then run execute it: ./runInstaller

Hope this helps.
 
Old 11-08-2010, 07:53 AM   #10
nbeayni
LQ Newbie
 
Registered: Oct 2010
Posts: 10

Original Poster
Rep: Reputation: 0
below what i got after issuing chmod 755 runInstaller

[oracle@oel5 Database]$ chmod 755 runInstaller
[oracle@oel5 Database]$ ls
doc install ISO response rpm runInstaller sshsetup stage welcome.html
[oracle@oel5 Database]$ ./runInstaller
./runInstaller: line 137: /home/oracle/Desktop/Database/install/.oui: Permission denied
 
Old 11-08-2010, 08:06 AM   #11
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

There is something seriously wrong with all of the permissions of the files and directories you copied.......

Can't you run the installer from the cd? (sh runInstaller).

If not, maybe this will help (as root):
Code:
cd /home/oracle/Desktop/
find . -exec chown oracle:oinstall {} \;
BTW: You keep posting the output with ls, which does not show any relevant information. Next time post the output of ls -l

Hope this helps.
 
Old 11-08-2010, 08:52 AM   #12
nbeayni
LQ Newbie
 
Registered: Oct 2010
Posts: 10

Original Poster
Rep: Reputation: 0
No i cannot run it from CD since i only have an ISO for the ORACLE Installer

below is the result it did not work after the exec chown

[root@oel5 ~]# cd /home/oracle/Desktop/
[root@oel5 Desktop]# find . -exec chown oracleinstall {} \;
[root@oel5 Desktop]# cd Database
[root@oel5 Database]# ls
doc install ISO response rpm runInstaller sshsetup stage welcome.html
[root@oel5 Database]# ./runInstaller
./runInstaller: line 137: /home/oracle/Desktop/Database/install/.oui: Permission denied
[root@oel5 Database]# ll
total 44
drwxr-xr-x 12 oracle oinstall 4096 Aug 17 2009 doc
drwxr-xr-x 4 oracle oinstall 4096 Aug 14 2009 install
drwxr-xr-x 2 oracle oinstall 4096 Nov 8 15:34 ISO
drwxr-xr-x 2 oracle oinstall 4096 Aug 14 2009 response
drwxr-xr-x 2 oracle oinstall 4096 Aug 14 2009 rpm
-rwxr-xr-x 1 oracle oinstall 4352 Aug 14 2009 runInstaller
drwxr-xr-x 2 oracle oinstall 4096 Aug 14 2009 sshsetup
drwxr-xr-x 14 oracle oinstall 4096 Aug 14 2009 stage
-rw-r--r-- 1 oracle oinstall 5400 Aug 17 2009 welcome.html
 
Old 11-08-2010, 09:05 AM   #13
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Quote:
No i cannot run it from CD since i only have an ISO for the ORACLE Installer
Burn the ISO to a cd?

Quote:
[root@oel5 Database]# ./runInstaller
./runInstaller: line 137: /home/oracle/Desktop/Database/install/.oui: Permission denied
As stated in the install doc you mention in your first post, this should be run as user oracle, _not_ root.

You do not mention if it does work with the sh runInstaller statement i've mentioned multiple times.

You do post the ls -l output, but _not_ from the correct directory (oui seems to have the problem, which is part of /home/oracle/Desktop/Database/install/ and not part of /home/oracle/Desktop/Database). Look the output of ls -la /home/oracle/Desktop/Database/install and check to see if the permissions are correct and change them if needed.

Hope this helps.
 
Old 11-08-2010, 09:26 AM   #14
nbeayni
LQ Newbie
 
Registered: Oct 2010
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
As stated in the install doc you mention in your first post, this should be run as user oracle, _not_ root.
same issue if i run it from root or oracle
[oracle@oel5 Database]$ ./runInstaller
./runInstaller: line 137: /home/oracle/Desktop/Database/install/.oui: Permission denied

Quote:
You do not mention if it does work with the sh runInstaller statement i've mentioned multiple times
did not solve the issue

[oracle@oel5 Database]$ sh runInstaller
runInstaller: line 137: /home/oracle/Desktop/Database/install/.oui: Permission denied


Quote:
You do post the ls -l output, but _not_ from the correct directory (oui seems to have the problem, which is part of /home/oracle/Desktop/Database/install/ and not part of /home/oracle/Desktop/Database). Look the output of ls -la /home/oracle/Desktop/Database/install and check to see if the permissions are correct and change them if needed.
below is the result:

drwxr-xr-x 4 oracle oinstall 4096 Aug 14 2009 .
drwxr-xr-x 9 oracle oinstall 4096 Nov 8 15:34 ..
-rw-r--r-- 1 oracle oinstall 28 Aug 14 2009 addLangs.sh
-rw-r--r-- 1 oracle oinstall 127 Aug 14 2009 addNode.sh
-rw-r--r-- 1 oracle oinstall 275 Aug 14 2009 attachHome.sh
-rw-r--r-- 1 oracle oinstall 182 Aug 14 2009 detachHome.sh
drwxr-xr-x 2 oracle oinstall 4096 Aug 14 2009 images
-rw-r--r-- 1 oracle oinstall 15166 Aug 14 2009 lsnodes
-rw-r--r-- 1 oracle oinstall 1997 Aug 14 2009 oraparam.ini
-rw-r--r-- 1 oracle oinstall 6437 Aug 14 2009 oraparamsilent.ini
-rw-r--r-- 1 oracle oinstall 180222 Aug 14 2009 .oui
drwxr-xr-x 2 oracle oinstall 4096 Aug 14 2009 resource
-rw-r--r-- 1 oracle oinstall 22033 Aug 14 2009 runSSHSetup.sh
-rw-r--r-- 1 oracle oinstall 101448 Aug 14 2009 unzip


thx in advance for your great help
 
Old 11-08-2010, 09:38 AM   #15
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi again,

As I already stated in post #11; Something is very wrong with the permissions of the files.

All .sh files should have 755 and probably others too (.oui to name just one).

I would suggest removing all that is in /home/oracle/Desktop/Database and copy it again as root using cp -pr <source> <destination>. Hopefully all permissions and owner/groups are copied correctly.

BTW: You didn't answer why you can't/won't burn the ISO to cd/dvd. It (installing from cd/dvd) is the way it should be done.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] 'Could not chdir to home directory /home/[user]: Permission denied' arashi256 Linux - Newbie 25 11-11-2011 09:29 AM
NFS problem: "Could not chdir to home directory /home/USER: Permission denied" sumanc Linux - Server 4 07-22-2010 04:12 PM
Crontab permission denied while making a directory in user's home Dfangs Linux - Server 3 05-29-2009 09:44 AM
cron/oracle: Permission denied rana_abdulwahid Linux - Newbie 2 04-28-2008 05:00 AM
permission denied to home directory ekdya Debian 3 11-08-2005 04:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration