Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 120140 - Normal users cannot execute shell scripts in /opt
Normal users cannot execute shell scripts in /opt
Product: Fedora
Classification: Fedora
Component: policy (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2004-04-06 07:23 EDT by Albert Strasheim
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-04-06 07:58:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Albert Strasheim 2004-04-06 07:23:34 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040312

Description of problem:
Normal users cannot execute shell scripts in /opt.

As root:

nano /opt/hello.sh
echo hello

chmox +x /opt/hello.sh

As normal user:

bash: /opt/hello.sh: /bin/bash: bad interpreter: Permission denied

The following SELinux error is generated:

Apr  6 13:26:56 asok kernel: audit(1081250816.581:0): avc:  denied  {
execute } for  pid=4515 exe=/bin/bash name=hello.sh dev=hda5
ino=410771 scontext=user_u:user_r:user_t tcontext=root:object_r:usr_t

Version-Release number of selected component (if applicable):
policy-1.9.2-10 bash-2.05b-38 filesystem-2.2.4-1

How reproducible:

Steps to Reproduce:
1. Run shell script in /opt as normal user

Actual Results:  Shell script fails to run

Expected Results:  Shell script should run

Additional info:

I am currently trying to figure out why Gaussian03 (commercial
computational chemistry software) won't run, and since I installed it
under /opt, fixing this bug might fix Gaussian03.
Comment 1 Daniel Walsh 2004-04-06 07:58:44 EDT
chcon -t bin_t /opt/hello.sh 
will fix it.

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