newbie: run script permissions

so, I feel really a newbie…
I have an error… I would like to start /etc/profile.d/oracle.sh script

> . /etc/profile.d/oracle.sh
bash: /etc/profile.d/oracle.sh: Permission denied
> id
uid=1000(john) gid=114(oinstall) groups=33(video),100(users),114(oinstall)
> ls -l /etc/profile.d/orac*
-rwx–x— 1 oracle oinstall 2418 2010-05-08 11:37 /etc/profile.d/oracle.csh
-rwx–x— 1 oracle oinstall 3179 2010-11-16 19:54 /etc/profile.d/oracle.sh
>

what I’ve missed? I wanted to put permission 710, so that oinstall accounts could just run the script.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If you do not have read permissions then you cannot run it. There is no
way for the system to let you run commands in a script it cannot read:

sudo chmod 750 /etc/profile.d/orac*

Good luck.

On 11/16/2010 01:04 PM, bongo zg wrote:
>
> so, I feel really a newbie…
> I have an error… I would like to start /etc/profile.d/oracle.sh
> script
>
>> . /etc/profile.d/oracle.sh
> bash: /etc/profile.d/oracle.sh: Permission denied
>> id
> uid=1000(john) gid=114(oinstall)
> groups=33(video),100(users),114(oinstall)
>> ls -l /etc/profile.d/orac*
> -rwx–x— 1 oracle oinstall 2418 2010-05-08 11:37
> /etc/profile.d/oracle.csh
> -rwx–x— 1 oracle oinstall 3179 2010-11-16 19:54
> /etc/profile.d/oracle.sh
>>
>
> what I’ve missed? I wanted to put permission 710, so that oinstall
> accounts could just run the script.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJM4ukGAAoJEF+XTK08PnB5eSAP/0p9q3x/o6QzhymbhJ90nn6N
R+HIBGdDWaBgHOrbSPPKoYuVrTN0sRWWoverX9Ua5Ttd3JZ9s11cKVF0JaO9qtBn
z85Bcq5J3zmjf0xIVhM8TXnuzcsxgzQBUV93zP13dWYRTvlRJZADyFPqE8Gp7pXB
mdehZdfr92rvHVud5y4F6U+8iqe0p4OuGIMtltp0g8UnlZTfwnYPVnXR4/Wn4NsX
LAmzXCrxkGlfw8EKhxkylOK3sjYdElF7z0JpKAi0xjE6kBTM/wExn5MyPesT1Ze4
m5cgVSLU6Ec6Od6+I2fo5oXDy45T+ghYTwiMEVZxtFgSHtlMeqFcrzKzzAYECYVa
8qfjJHjEdCP2pXFvQa7rilRbj3zkDJhJKxoM1CJJ5Ke9tDEkw7yApVfN9Z831pkN
fuhCnyKGHeKsGEUh3n37pMzqe1Jp01RyH8KoQs7dTUCkardLzRlsgfMB5w6luWeD
n91QFfHLGmcHia2CLts6sSZHVaNYdbnVOPrSZ0eLoGWNKYGuSxcrrT/wlsltabmA
MUXytqBnzTWHnjKqhmWqIRPwxVLT8WwxNE9IrfhOH/zTiy/MW7ycf2ZJu8ioa6Va
0QasTxqZ8iHAJxh/ATfD9NiL/bSCC/IVcuMX/gSzfwD139zbCTfBXwUcG4wgW5HL
Uvkn6Tm8UVhPvQe1X7ol
=q27P
-----END PGP SIGNATURE-----

seeing as the"orical" BD is the owner is the owner of the “oracle.sh” script
run it as “orical” user
but root SHOULD have the group “oinstall” already added to it

a normal user should not be able to run that script

On 2010-11-16 21:04, bongo zg wrote:
>
> so, I feel really a newbie…
> I have an error… I would like to start /etc/profile.d/oracle.sh
> script
>
>> . /etc/profile.d/oracle.sh
> bash: /etc/profile.d/oracle.sh: Permission denied

You are not supposed to run directly anything in that directory.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

It’s unfortunate terminology on the OP’s part. He’s actually trying to source the oracle profile file and not run it, but everybody picked up on that. In fact what’s needed is read permission, not execute permission. So mode 640 is sufficient.

On 2010-11-17 02:36, ken yap wrote:
>
> It’s unfortunate terminology on the OP’s part. He’s actually trying to
> source the oracle profile file and not run it, but everybody picked up
> on that. In fact what’s needed is read permission, not execute
> permission. So mode 640 is sufficient.

Ah, I understand. Yes, it is the missing read permission.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)