1

I am running Oracle Linux 7 for the purpose of hosting an Oracle database.

As part of this process I run a script that mails a log file at the end on a daily basis.

Crux of my issue is that my script executes the mailx command as root with no issue. When I run as the normal operation user "oracle", it fails with this error:

temporary mail file: No such file or directory

The failing command is:

cat $ORACLE_BASE/admin/DBSID/dpdump/EXPORT.log | mailx -r "FROMADD@domain.com" -s "subject" -S smtp="10.10.10.10:25" TOADDR@domain.com

I have already verified that the oracle user is in the mail group and have checked that the /TMP directory is of standard permission values. I have also checked the permissions of the spool directory and its subfiles.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
  • Please edit and add to your question, the value of the TMPDIR environment variable at the time mailx is invoked. If it is non-empty, what is the output of ls -ld $TMPDIR? – Jim L. May 10 '19 at 20:11
  • Well now I feel about 4 inches tall. Total rookie mistake. the export command in the setEnv.sh script reads export TMP=/Tmp That obviously won't work. Removed the capital and it functions as planned. Sorry to waste your time on something so simple – user352371 May 10 '19 at 20:43
  • I'm happy to help. – Jim L. May 10 '19 at 20:45

1 Answers1

0

See Jim L. comment on my question. It drove me to the answer. I had a bad export command that referenced /Tmp. Altering this to what it should have been (/tmp) fixed the issue. Lord save me from dumb typos.