0

I am writing a program for a DISA STIG version of Red Hat Linux 6.5. I wrote a shell script to do self extracting on the program and when it self extracts put temporary files in the tmp directory that will later be moved around and deleted. The permissions for the temporary directory look like such when I run ls -l. drwxrwxrwt. 4 root root 4096 Sep 25 10:14 tmp. However when I run my script to install my program I keep egtting the following output Verifying archive integrity... All good. Uncompressing installation package................................... ./foo.run: line 391: ./tmp/foo/install.sh: Permission denied line 391 is as follows, eval $script $scriptargs $*; res=$? with script="./tmp/foo/install.sh" and scriptargs="". Does anyone know if it is the STIG guidelines that may be causing this issue or something that I am doing?

  • namei -lx <full path to install.sh> is useful for viewing permissions along the whole path. Also try running with SELinux temp disabled: setenforce=0. – garethTheRed Sep 25 '14 at 15:13
  • I actually catted /etc/mtab and saw the problem, the tmp was set to no exec so I went into /etc/fstab and changed it to mount with exec – jgr208 Sep 25 '14 at 15:17
1

One thing to be aware, is that STIG locks down /tmp with noexec.

If you already spent some time on the box, it's possible that you won't be able to execute the files out of that folder. Try another location for download/install.

Also, run your installer as SUDO

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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