Why can't apache access files in /tmp?
Chris Green
cl at isbd.net
Wed Oct 31 15:21:02 UTC 2018
On Wed, Oct 31, 2018 at 01:51:07PM +0100, Tom H wrote:
> On Wed, Oct 31, 2018 at 12:50 PM Chris Green <cl at isbd.net> wrote:
> > On Wed, Oct 31, 2018 at 12:06:24PM +0100, Tom H wrote:
> >> On Tue, Oct 30, 2018 at 4:03 PM Colin Law <clanlaw at gmail.com> wrote:
>
>
> >>> 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.
> >
> > I have two files which seem relevant:-
> >
> > /lib/systemd/system/apache2.service
> > /lib/systemd/system/apache2.service.d/apache2-systemd.conf
> >
> > Both of them seem to be 'original' as in installed from my
> > distribution and not changed since.
>
> 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?
>
It's on 18.04 and I'm pretty sure I haven't changed/added anything.
>
> > I assume the name 'override.conf' isn't actually important and
> > anything in /etc/systemd/system/apache2.service.d will be acted upon
> > by systemd.
>
> The file name has to end with ".conf". I asume that systemd'll be able
> to handle two drop-ins, one under "/lib" and one under "/etc" (!).
>
>
> > Does the override file have to specify everything or can it just
> > change individual parameters with the rest being set by the files in
> > /lib/systemd/system?
>
> Yo can override individual parameters but you have to use the section
> "titles" for example:
>
> To override
>
> [Install]
> WantedBy=multi-user.target
>
> the drop-in'll have to be
>
> [Install]
> WantedBy=graphical.target
>
> 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
>
OK, thanks for all the information.
--
Chris Green
More information about the ubuntu-users
mailing list