Forum Discussion

phine_at_nla's avatar
2 months ago

Changing tmpdir on Linux for v10.5

I've tried adding TMPDIR=/var/tmp/netbackup in /etc/init.d/netbackup and adding TMPDIR and TEMPDIR into /usr/openv/var/global/nbdeployutilconfig.txt

These do not change the TMPDIR

I am looking at the fapolicyd rules and can see that tools like nbutil and nbhealthchecker create /tmp/par-726f6f74/temp-2527638/nbhealthchecker or /tmp/par-726f6f74/temp-3947960/nbutil

This par-726f6f74 seems consistent at the moment, but that may change with the next upgrade, I don't know. I'd like to create a future proofed set of policies by taking control of the TMPDIR, and then Veritas is free to do what they want under that.

example entries

fapolicyd[613787]: rule=103 dec=deny_log perm=open auid=-1 pid=2527638 exe=/tmp/par-726f6f74/temp-2527638/nbhealthchecker : path=/tmp/par-726f6f74/temp-2527638/inc/lib/check_nb_license_validity.pm ftype=text/x-perl trust=0
fapolicyd[613787]: rule=103 dec=deny_log perm=open auid=-1 pid=2527638 exe=/tmp/par-726f6f74/temp-2527638/nbhealthchecker : path=/tmp/par-726f6f74/temp-2527638/inc/lib/check_nb_norestrictions_file_existence.pm ftype=text/x-perl trust=0
fapolicyd[613787]: rule=40 dec=deny_log perm=open auid=-1 pid=2530921 exe=/tmp/par-726f6f74/temp-2530921/nbhealthchecker : path=/tmp/par-726f6f74/temp-2530921/43caee81.so ftype=application/x-sharedlib trust=0
fapolicyd[613787]: rule=40 dec=deny_log perm=open auid=-1 pid=2530921 exe=/tmp/par-726f6f74/temp-2530921/nbhealthchecker : path=/tmp/par-726f6f74/temp-2530921/026f509c.so ftype=application/x-sharedlib trust=0
fapolicyd[613787]: rule=40 dec=deny_log perm=open auid=-1 pid=2530921 exe=/tmp/par-726f6f74/temp-2530921/nbhealthchecker : path=/tmp/par-726f6f74/temp-2530921/556e1d16.so ftype=application/x-sharedlib trust=0
fapolicyd[613787]: rule=40 dec=deny_log perm=open auid=-1 pid=2530921 exe=/tmp/par-726f6f74/temp-2530921/nbhealthchecker : path=/tmp/par-726f6f74/temp-2530921/2e36ee1c.so ftype=application/x-sharedlib trust=0

Thanks in advance

Peter

4 Replies

  • Try exporting TMPDIR globally in bash profile or systemd service.

  • Hi phine_at_nla 

    What version of RHEL are you running - depending on the version the NetBackup startup may actually be located in a different location (such as under /etc/systemd).

    Secondly, you could try adding the environment to one of the files in /etc/profile.d (such as sh.local) - this should then include the variable for all startup programs. And don't forget to add the export directive to the entry (e.g. export TMPDIR=/usr/openv/tmp). 

    Cheers

    • phine_at_nla's avatar
      phine_at_nla
      Level 2

      It's RHEL8. No RHEL9 server have the client installed as it happens.

      I did " sudo systemctl edit netbackup.service" and added 
      Environment="TMPDIR=/var/tmp/netbackup"

      No help

      I've created a fapolicyd rule, which i disklike, but appears to work
      allow perm=open dir=/tmp/par-726f6f74/ : dir=/tmp/par-726f6f74/ ftype=application/x-sharedlib trust=0
      allow perm=open dir=/tmp/par-726f6f74/ : dir=/tmp/par-726f6f74/ ftype=text/x-perl trust=0

      Controlling the tmp dir would be better, better still; NB could stop creating stupidly named directories. Just extract the utilities somewhere consistent and leave it be.

      I'll try the profile method.

      Thanks Anyway.

      P