Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I don't understand this? Other uses of sudo work fine.

[oracle@o plugins]$ su
Password: 
[root@ plugins]# su nrpe
bash-3.2$ /home/oracle/obiee/instances/instance1/bifoundation/OracleBIApplication/coreapplication/setup/bi-init.sh
bash: /home/oracle/obiee/instances/instance1/bifoundation/OracleBIApplication/coreapplication/setup/bi-init.sh: Permission denied
bash-3.2$ sudo -l
Matching Defaults entries for nrpe on this host:
    env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR
    LS_COLORS MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE LC_COLLATE
    LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC
    LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET
    XAUTHORITY"

Runas and Command-specific defaults for nrpe:


User nrpe may run the following commands on this host:
    (ALL) NOPASSWD:
    /home/oracle/obiee/instances/instance1/bifoundation/OracleBIApplication/coreapplication/setup/bi-init.sh
bash-3.2$ 
share|improve this question
add comment

1 Answer

up vote 0 down vote accepted
chmod +x /home/oracle/obiee/instances/instance1/bifoundation/OracleBIApplication/coreapplication/setup/bi-init.sh

The script needs to be set to 'executable' before you can actually execute it. It's to stop people executing random text files and potentially making a hash of their system.

Another problem is permissions above the script. You need to ensure the directories the scripts reside in are readable by world/the user you want to be able to.

share|improve this answer
    
it's set to 755 –  Bill S Oct 3 '12 at 21:40
1  
Then it's because your use can't access the directory the file resides in. –  Jay Oct 3 '12 at 21:41
    
i got it. I thought only the file needed the right permissions. –  Bill S Oct 3 '12 at 21:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.