Why can't apache access files in /tmp?
Tom H
tomh0665 at gmail.com
Wed Oct 31 11:06:24 UTC 2018
On Tue, Oct 30, 2018 at 4:03 PM Colin Law <clanlaw at gmail.com> wrote:
> On Tue, 30 Oct 2018 at 14:51, Chris Green <cl at isbd.net> wrote:
>> On Tue, Oct 30, 2018 at 01:39:13PM +0000, Colin Law wrote:
>>> On Tue, 30 Oct 2018 at 13:33, Chris Green <[1]cl at isbd.net> wrote:
>>>
>>> I want to put some temporary html files in /tmp (well, a
>>> sub-directory of /tmp) and view them using apache2. I always get
>>> permission denied and it seems as if apache2 refuses to access any
>>> files in /tmp.
>>>
>>> Could possibly be that the apache systemd script specifies privateTmp
>>
>> Yes, I think that's it (or at least it's something to do with
>> systemd). Whatever, it's a real nuisance.
>>
>>
>> Where can I put files that apache can 'see' and which will get cleared
>> out at intervals?
>
> It should be easy enough to change the systemd startup script, it will
> likely be in /etc/systemd/system.
In "/lib/systemd/system/" not in "/etc/systemd/system/" by default.
> Make a copy of it with a different name and edit that, then disable
> the usual one and enable yours. If you don't make a copy then it will
> get overwritten when you update.
"systemctl edit <unit>" will set up a
"/etc/systemd/system/<unit>.d/override.conf" drop-in automatically.
More information about the ubuntu-users
mailing list