Why can't apache access files in /tmp?

Tom H tomh0665 at gmail.com
Wed Oct 31 15:55:17 UTC 2018


On Wed, Oct 31, 2018 at 3:25 PM Colin Watson <cjwatson at ubuntu.com> wrote:
> On Wed, Oct 31, 2018 at 01:51:07PM +0100, Tom H wrote:


>> Is this on 16.04? It doesn't have
>> "/lib/systemd/system/apache2.service" by default; it only has
>> "/lib/systemd/system/apache2.service.d/apache2-systemd.conf" to
>> override the sysv-generator-created service unit. Are you sure that
>> you didn't create it?
>
> Both these files exist in the shipped package on 18.04. (It seems weird
> to ship both rather than just fold the override into the main unit file,
> but maybe there's some reason for it.)

I remember "/lib/systemd/system/apache2.service.d/apache2-systemd.conf"
from 16.04 because I had the problem that resulted in its creation.

On my 18.10 laptop, only "/lib/systemd/system/apache2.service" exists.

I don't have access to an 18.04 system to take a look at why. It
doesn't make sense unless it's a mistake (that's been corrected in
18.10) or "apache2.service" is the upstream unit and the drop-in's an
Ubuntu delta.


>> IIRC, there's an exception for ExecStart
>>
>> To override
>>
>> [Service]
>> ExecStart=/sbin/<daemon> -optionX
>>
>> the drop-in'll have to be
>>
>> [Service]
>> ExecStart=
>> ExecStart=/sbin/<daemon> -optionY
>
> This is true for any directive that can be specified more than once to
> accumulate a list; the relevant systemd.* manual pages document the
> directives for which this is the case.

Thanks. So I mis-remembered :(

I've just read "man systemd.unit" and the last paragraph's:

"Note that for drop-in files, if one wants to remove entries from a
setting that is parsed as a list (and is not a dependency), such as
AssertPathExists= (or e.g. ExecStart= in service units), one needs to
first clear the list before re-adding all entries except the one that is
to be removed. Dependencies (After=, etc.) cannot be reset to an empty
list, so dependencies can only be added in drop-ins. If you want to
remove dependencies, you have to override the entire unit."




More information about the ubuntu-users mailing list