Remote Execution fails with error: unable to execute /var/tmp/foreman-ssh-cmd/xxxxxxxx/script: Permission denied.
Environment
- Red Hat Satellite 6
Issue
-
Remote Execution fails with the below error:
sh: unable to execute /var/tmp/foreman-ssh-cmd/xxxxxxxx/script: Permission denied
Resolution
-
On the host running remote jobs, if
/tmpor/var/tmpis mounted withnoexecpermissions then perform the below steps:-
Edit
/etc/fstaband removenoexecfrom/tmpand/var/tmpmount points. -
Remount
/tmpand/var/tmpto apply those changes# mount -o remount /tmp # mount -o remount /var/tmp
-
Root Cause
- Wrong permission is set on host /var/tmp or /tmp.
Diagnostic Steps
-
On the affected content host, check the permissions set for
/var/tmp&/tmpin/etc/fstab.[root@host ~]$ cat /etc/fstab /dev/mapper/rootvg-tmp /tmp xfs defauts,nodev,nosuid 0 0 /dev/mapper/rootvg-var_tmp /var/tmp xfs defauts,nodev,noexec,nosuid 0 0
SBR
Product(s)
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.