Hi Artix folk,
This my second post in a Linux forum, so I apologize in advance for any ambiguity or mistake.
I'm running the LXQT - Openrc version of Artix. A few days ago I wanted to set up and run ddclient daemon. But I faced many problems.
First, I didn't know that there is a
ddclient-openrc script that should be installed along with ddclient. I think this should be
added as a dependency because ddclient will not run without it.
When I issued the command:
$ sudo rc-service ddclient start
It gave me an error message that I don't exactly remember, but it was something like "
ddclient is not a known service".
I thought it was a configuration problem, so I spent a lot of time playing with the "/etc/ddclient/ddclient.conf" file without any success. Then; I discovered by chance that there is an openrc script on the repositories, so I installed it; but another problem arose.
When I tried to start ddclient service again, I got this:
* checkpath: owner `ddclient:ddclient' not found
* ERROR: ddclient failed to start
While waiting for my account at the Artix forums to be activated by admin, I searched online for a similar problem, and I ironically found a bug report related to systemd at this RedHat site (https://bugzilla.redhat.com/show_bug.cgi?id=1167493)
I followed the solution there and issued the commands:
$ sudo mkdir /var/run/ddclient
$ sudo chown ddclient:ddclient /var/run/ddclient
But again, I received this output, as the ddclient user and group were not created automatically:
chown: invalid user: ‘ddclient:ddclient’
After creating them manually, everything ran ok:
$ sudo useradd ddclient
$ sudo usermod -a -G ddclient ddclient
$ sudo chown ddclient:ddclient /var/run/ddclient
Finally;
$ sudo rc-service ddclient start
* /etc/ddclient/ddclient.conf: correcting owner
* /run/ddclient: correcting mode
* /var/cache/ddclient: correcting mode
* /var/cache/ddclient: correcting owner
* Starting ddclient ... [ ok ]
Was there something I did wrong from the beginning? Or is it a kind of bug?Sorry if I elaborated a bit, and thanks for your patience.
Thanks for the report. This has been fixed in ddclient-3.9.0-3.1 (https://gitea.artixlinux.org/packagesD/ddclient/commit/93e29742fceb95744b882baca79ed189486b4072) so you don't have to manually create user and group.
Make sure you have opentmpfiles installed and its services running before updating the package
Thanks for your reply, thefallenrat.
I've installed opentmpfiles, along with its openrc script, but I cannot find its service:
$ sudo rc-service tmpfiles start
* rc-service: service `tmpfiles' does not exist
$ sudo rc-service opentmpfiles start
* rc-service: service `opentmpfiles' does not exist
Also, I cannot find ddclient-3.9.0-3.1. Is it in a testing repository?
It's called
opentmpfiles-dev and
opentmpfiles-setup but they already added to
boot and
sysvinit by the package anyway if you installed the openrc package
To check its services, use
rc-status --all command
See below for guide on how to use OpenRC:
https://wiki.gentoo.org/wiki/OpenRC#Usage
It's in
galaxy repository (
extra). Wait for mirrors to sync
Thanks again, and thank you for the openrc usage link.
I've updated ddclient successfully, and ddclient seems like working properly and updating my ip. However, when I check its status:
$ sudo rc-service ddclient status
* status: crashed
I looked at /var/log/daemon.log file (I'm not sure if this is the right place to look at for errors), but it says:
Aug 28 15:27:27 anoki-pc /etc/init.d/ddclient[4048]: start-stop-daemon: no matching processes found
Aug 28 15:27:27 anoki-pc ddclient[4085]: WARNING: file /var/cache/ddclient/ddclient.cache: Cannot open file '/var/cache/ddclient/ddclient.cache'. (Permission denied)
Aug 28 15:27:28 anoki-pc ddclient[4092]: WARNING: found neither ipv4 nor ipv6 address
Aug 28 15:27:28 anoki-pc ddclient[4093]: FATAL: Cannot create file '/var/cache/ddclient/ddclient.cache'. (Permission denied)
Checked permissions for that file /var/cache/ddclient/ddclient.cache
-rw------- 1 root root 262 أغس 28 15:27 /var/cache/ddclient/ddclient.cache
Should I change the ownership of ddclient.cache to ddclient user/group?
Hmm that's weird. Pretty sure
opentmpfiles would already set that directory and its files to be owned by
ddclient:ddclient and not root (see ddclient tmpfiles (https://gitweb.gentoo.org/repo/gentoo.git/plain/net-dns/ddclient/files/ddclient.tmpfiles))
I suggest reverting any modification you have made prior to updating the package, and try rebooting
I've just totally removed ddclient and ddclient-openrc from the system, then deleted ddclient user and rebooted.
After booting, I've tried reinstalling ddclient with ddclient-openrc, but got this error:
(6/7) installing ddclient [############################] 100%
warning: directory permissions differ on /var/cache/ddclient/
filesystem: 700 package: 755
Optional dependencies for ddclient
smtp-forwarder: email support requires sendmail binary
(7/7) installing ddclient-openrc [############################] 100%
:: Running post-transaction hooks...
(1/3) Warn about old perl modules
(2/3) Displaying openrc service help ...
==> Add a service to runlevel:
rc-update add <service> <runlevel>
==> Start/stop/restart a service:
rc-service <service> <start/stop/restart>
(3/3) Creating temporary files...
chown: invalid user: ‘ddclient’
chgrp: invalid group: ‘ddclient’
chown: invalid user: ‘ddclient’
chgrp: invalid group: ‘ddclient’
chown: invalid user: ‘ddclient’
chgrp: invalid group: ‘ddclient’
error: command failed to execute correctly
I just wanted to let you know that I've recreated ddclient user and group again, then reinstalled ddclient without problems.
After a reboot, I've checked the ddclietnt daemon status, and it's running properly till now.
Thx thefallenrat for your help.
As I checked now, the same problem persists
$ sudo rc-service ddclient status
* status: crashed
/var/log/daemon.log file:
FATAL: Cannot create file '/var/cache/ddclient/ddclient.cache'. (Permission denied)
$ sudo ls -l /var/cache/ddclient/ddclient.cache
-rw------- 1 root root 262 أغس 28 15:27 /var/cache/ddclient/ddclient.cache
The commands failed because those folders are already exist and they're created by you
As I said before, revert any modification you have made prior to updating the package
I think ddclient needs its own sysusers file to create user:group.
.
I don't remember creating the folder /var/cache/ddclient
I solved the issue by modifying the ownership of that file.
ddclient is running without any issue from yesterday.
Anyway, thanks for your time.