Problem
NetBackup client fails to install with a "Permission denied ERROR", even though the source files are located in /tmp, have full permissions, and run as root.
The client install files in /tmp may or may not delete themselves as well, due to the way the client_install script cleans up after itself.
Error Message
From the Primary/Master Server:
root@NBUMaster bin]# ./install_client_files sftp RHEL7Client root
RHEL7Client...
Client RHEL7Client -- Linux hardware running RedHat2.6.18
Installing NetBackup software on RHEL7Client as user root
Connecting to RHEL7Client...
root@RHEL7CLient's password:
sftp completed successfully.
The root user on rh7test must now execute the command
"sh /tmp/bp.10892/client_config [-L]". The optional argument, "-L",
is used to avoid modification of the client's current bp.conf file.
RHEL7Client install complete
From the Client host:
root@RHEL7Client ~]# sh /tmp/bp.5349/client_config
/tmp/bp.5349/client_config: line 2505: /tmp/bp.5349/openv/netbackup/client/Linux/RedHat2.6.18/pdinstall: Permission denied
ERROR: PureDisk precheck failed. Resolve issues with PureDisk installations and re-run this NetBackup installation script.
client_config_failed
Cause
Client had the noexec attribute set in /etc/fstab for the /tmp filesystem. Scripts could not be ran from /tmp.
Mount command from Client host:
[root@RHEL7Client ~]# mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=2014336k,nr_inodes=503584,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,seclabel,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mapper/rhel_redhat71-root on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=34,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel)
mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
/dev/mapper/rhel_redhat71-tmp on /tmp type xfs (rw,noexec,relatime,seclabel,attr2,inode64,noquota)
/dev/sda1 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
The /etc/fstab from Client host:
[root@RHEL7Client ~]# cat /etc/fstab
#
# /etc/fstab
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/rhel_redhat71-root / xfs defaults 0 0
UUID=cf1d6f54-ae59-499b-ba2c-8054dc897f49 /boot xfs defaults 0 0
/dev/mapper/rhel_redhat71-tmp /tmp xfs defaults, noexec 0 0
/dev/mapper/rhel_redhat71-swap swap swap defaults 0 0
Solution
Solution 1: (Safe, in case tmp is in use by other programs)
- Remove noexec from the fstab line for tmp
- Save the fstab
- Reboot the machine so that /tmp is remounted with noexec removed.
- Complete the client install
- (Optional) Add noexec back to tmp and reboot the machine, if noexec is desired for security purposes.
Solution 2: (Not safe if tmp is in use by other programs)
- Exit the /tmp directory to another directory, such as ~ (home)
- Remount /tmp with the exec flag:
mount -o remount,exec /tmp
- Complete the client install
- Reboot the machine or remount /tmp with the noexec flag:
mount -o remount,noexec /tmp
OR...
You can create a temporary "tmp" directory somewhere else, and export TMPDIR and NB_TMPDIR to that directory and when the install is finished you can delete the temporary directory that was used.