Internal documentation only
This page has been marked as draft.
How to save a scheduled report under /tmp subfolder
Related to Copied
unable to save, /tmp subfolders, not writable
Problem Copied
- Unable to save an OP5 scheduled report on any subfolders of /tmp directory
Possible Cause Copied
Httpd has service setting PrivateTmp=true by default, as does a lot of services. This means that each service will create their own tmp directory in order to not accidentally share state between them.
In the example above, when setting the save location to /tmp/SLA/ this actually resolves to /tmp/<private-httpd-tmp-dir>/tmp/SLA/ which is a folder that does not exist and is therefore not writable. If that directory is created with the appropriate permissions, it should work.
The service setting can be verified by looking at the service file for httpd and looking for the PrivateTmp setting:
systemctl cat httpd
However, cron, which generates and sends the reports according to the schedule, does not do this via httpd, so those reports will show up in regular /tmp, while send now will not.
Possible Solution Copied
You may add a service override file for httpd to turn off this setting, and not edit the service file directly. The easiest way to do this is with systemctl:
systemctl edit httpd
And then add the section:
[Service]
PrivateTmp=false
Verify that the override file is in use:
systemctl cat httpd
And then reload both systemctl and httpd
systemctl daemon-reload && systemctl restart httpd