Not able to run executable as another user

Asked by passionguy

I ran the following command on a terminal to install Oracle.

./runInstaller -ignoreprereq
bash: ./runInstaller: Permission denied

I created the user for the Oracle installation using this commands below:
sudo groupadd oinstall
sudo groupadd dba
sudo useradd -g oinstall -G dba -p passwd -d /home/oracle -m oracle -s /bin/bash

How could i run this command. Could you also provide a link about creating users & groups & assigning privileges to users thru terminal.

Thanks in advance....

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Micah Gersten
Solved:
Last query:
Last reply:
Revision history for this message
Ariel Cabral (acabral1961) said :
#1

In Ubuntu you can act as your user (normal command) or as root (using sudo), if you want to act as dba user you must login as dba.
But if you want to run ./runinstaller you must run (at the console):
sudo ./runinstaller
Hope this help, let me know

Revision history for this message
passionguy (fayazahmedj) said :
#2

I tried this but now it says the error below:

sudo: runInstaller:command not found

Revision history for this message
Micah Gersten (micahg) said :
#3

No, that's not correct. As the main user on Ubuntu, you can change your user:

sudo su oinstall

then you can run a program as the other user if it's executable by that user:

./runinstaller

Revision history for this message
passionguy (fayazahmedj) said :
#4

Actually i logged in as oinstall user & i m still getting this....

Revision history for this message
passionguy (fayazahmedj) said :
#5

I alos tried the method of urs

Revision history for this message
Micah Gersten (micahg) said :
#6

run ls -l, can you post that line here?

Revision history for this message
Micah Gersten (micahg) said :
#7

sorry, you just need ls -l runinstaller

Revision history for this message
passionguy (fayazahmedj) said :
#8

i m confused sorry....which one i should type

Revision history for this message
Best Micah Gersten (micahg) said :
#9

passionguy wrote:
>
> passionguy gave more information on the question:
> i m confused sorry....which one i should type
>
>

ls -l runinstaller

Revision history for this message
passionguy (fayazahmedj) said :
#10

I changed the file permission from your clue but i m encountering another error.

Error:
./runInstaller: 63: /home/oracle/database/install/.oui: Permission denied

There is no directory with this name ./oui

Revision history for this message
Micah Gersten (micahg) said :
#11

passionguy wrote:
> I changed the file permission from your clue but i m encountering
> another error.
>
> Error:
> ./runInstaller: 63: /home/oracle/database/install/.oui: Permission denied
>
> There is no directory with this name ./oui
>
>
Can you run ls -asl /home/oracle/database/install/?

Revision history for this message
passionguy (fayazahmedj) said :
#12

Well i found the file(hidden) permission to execute unchecked & then i m able to run the file.

How can i do this thru terminal.

Thanks very much for your help.....

Revision history for this message
Micah Gersten (micahg) said :
#13

passionguy wrote:
> Well i found the file(hidden) permission to execute unchecked & then i m
> able to run the file.
>
> How can i do this thru terminal.
>
> Thanks very much for your help.....
>
>

You should probably look at the man page for chmod:
man chmod

To give execute privs to all chmod +x file/dir

Revision history for this message
passionguy (fayazahmedj) said :
#14

Thanks Micah Gersten, that solved my question.