Re: How to remove settings from a systemd unit file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Felix Miata writes:

> I tried using

> systemctl edit httpd

> And putting this in there:

> [Service]
> ProtectHome=

> However this apparently did not work.

Please show us the override file in /etc/systemd* that resulted from your edits.
Using systemctl edit for for over a year had me baffled.

Exactly that:

[root@monster ~]# cat /etc/systemd/system/httpd.service.d/override.conf
[Service]
ProtectHome=
[root@monster ~]#

This did not work.

> I threw in the towel and just edited
> /lib/systemd/system/httpd.service and commented this setting out, entirely,
> to finally fix this issue, and happy git pushing resumed.

> But how do I fix this so that the next apache update doesn't clobber this?

Get the override to work. I have several working.

Above is what I tried first, based on all the available documentation.

Eventually, by guessing, and staring at each word in the man page, I came up with:

ProtectHome=false

instead, and this worked. Good luck finding where this is documented in the man pages, for overrides. There were barrels of laughs in systemd.exec(5). First, there are several instances of "ProtectHome=yes" sprinkled in random places. Then, when you get to the actual description:

     ProtectHome=
          Takes a boolean argument or the special values "read-only" or
          "tmpfs". If true, the directories /home/, /root, and /run/user are
          made inaccessible and empty for processes invoked by this unit.

What does "true" mean here? Does it refer to the setting existence, overall? Or, boolean as "true" and "false", but if so, what's "ProtectHome=yes" is all about?

Just by a random guess I tried an override of "ProtectHome=false", and this was the magic incantation:

[root@monster conf.d]# cat /etc/systemd/system/httpd.service.d/override.conf
[Service]
ProtectHome=false
[root@monster conf.d]#

Attachment: pgpbAzYGbvglf.pgp
Description: PGP signature

--
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux