~alpine/users

4 2

ddclient: file ownership error

Wolfgang Klein <klein.wolfg@web.de>
Details
Message ID
<e2544054-3fda-47db-ab98-500f9bb86415@web.de>
DKIM signature
missing
Download raw message
Hello,

this is the contents of /etc/ddclient:


/etc/ddclient# ls -alF
total 24
drwxr-----  2 ddclient ddclient  4096 Oct 11 20:54 ./
drwxr-xr-x 46 root     root      4096 Oct 11 20:47 ../
-rw-------  1 ddclient ddclient   181 Oct 12 07:35 ddclient.conf
-rw-------  1 ddclient ddclient 12031 Mar 10  2025 ddclient.conf.orig


And this is what ddclient tells me:


ddclient -daemon=0 -debug -verbose -noquiet
WARNING: [file /etc/ddclient/ddclient.conf]> file should be owned only 
by ddclient or not be
writable.


This answer does not make any sense to me, because ownership and 
permissions are exactly set as the error message says they should be and 
they are identical to the vanilla file that was created during 
installation.

What is wrong there? Am I completely misinterpreting something?


Greetings,
Wolfgang
Andreas Kähäri <andreas.kahari@abc.se>
Details
Message ID
<aOttBjEjF4meaOkt@eeyore.invalid>
In-Reply-To
<e2544054-3fda-47db-ab98-500f9bb86415@web.de> (view parent)
DKIM signature
missing
Download raw message
On Sun, Oct 12, 2025 at 07:56:14AM +0200, Wolfgang Klein wrote:
> 
> Hello,
> 
> this is the contents of /etc/ddclient:
> 
> 
> /etc/ddclient# ls -alF
> total 24
> drwxr-----  2 ddclient ddclient  4096 Oct 11 20:54 ./
> drwxr-xr-x 46 root     root      4096 Oct 11 20:47 ../
> -rw-------  1 ddclient ddclient   181 Oct 12 07:35 ddclient.conf
> -rw-------  1 ddclient ddclient 12031 Mar 10  2025 ddclient.conf.orig
> 
> 
> And this is what ddclient tells me:
> 
> 
> ddclient -daemon=0 -debug -verbose -noquiet
> WARNING: [file /etc/ddclient/ddclient.conf]> file should be owned only by
> ddclient or not be
> writable.
> 
> 
> This answer does not make any sense to me, because ownership and permissions
> are exactly set as the error message says they should be and they are
> identical to the vanilla file that was created during installation.
> 
> What is wrong there? Am I completely misinterpreting something?

I don't use ddclient, and know nothing about it, but if you started the
tool as a user different from the ddclient user, it might be complaining
about the fact that the file is not owned by the user you started it as
(not actually the ddclient user).  Try starting it as the ddclient user
instead.

	sudo -u ddclient ddclient -daemon=0 -debug -verbose -noquiet

... or something like that.

If I'm barking up the wrong tree, please ignore me. :)


-- 
Matti Andreas Kähäri
Uppsala, Sweden

.
Wolfgang Klein <klein.wolfg@web.de>
Details
Message ID
<33666daa-a206-49e4-96de-038d5eaa1108@web.de>
In-Reply-To
<aOttBjEjF4meaOkt@eeyore.invalid> (view parent)
DKIM signature
missing
Download raw message
Andreas Kähäri wrote:

> I don't use ddclient, and know nothing about it, but if you started the
> tool as a user different from the ddclient user, it might be complaining
> about the fact that the file is not owned by the user you started it as
> (not actually the ddclient user).  Try starting it as the ddclient user
> instead.
>
> 	sudo -u ddclient ddclient -daemon=0 -debug -verbose -noquiet
>
> ... or something like that.
>
> If I'm barking up the wrong tree, please ignore me. :)
>
>


No, it might turn out to be the right tree, but with some obstacles 
around it: since "sudo" is not installed, I tried

su - ddclient -c "ddclient -daemon=0 -debug -verbose -noquiet"

and was told, the account is not available. So I changed the shell for 
user ddclient from /sbin/nologin to /bin/bash. After that: no more 
complaining about ownership, but also no output whatsoever! Just a quiet 
cursor quietly entering a new line, that's all. And of course no action 
is done either.

So, how to make ddclient work on Alpine? Right now I have no idea. :(
Andreas Kähäri <andreas.kahari@abc.se>
Details
Message ID
<aOuVyvX1Q9Y2MIlz@eeyore.invalid>
In-Reply-To
<33666daa-a206-49e4-96de-038d5eaa1108@web.de> (view parent)
DKIM signature
missing
Download raw message
On Sun, Oct 12, 2025 at 12:34:51PM +0200, Wolfgang Klein wrote:
> Andreas Kähäri wrote:
> 
> > I don't use ddclient, and know nothing about it, but if you started the
> > tool as a user different from the ddclient user, it might be complaining
> > about the fact that the file is not owned by the user you started it as
> > (not actually the ddclient user).  Try starting it as the ddclient user
> > instead.
> > 
> > 	sudo -u ddclient ddclient -daemon=0 -debug -verbose -noquiet
> > 
> > ... or something like that.
> > 
> > If I'm barking up the wrong tree, please ignore me. :)
> > 
> > 
> 
> 
> No, it might turn out to be the right tree, but with some obstacles around
> it: since "sudo" is not installed, I tried
> 
> su - ddclient -c "ddclient -daemon=0 -debug -verbose -noquiet"
> 
> and was told, the account is not available. So I changed the shell for user
> ddclient from /sbin/nologin to /bin/bash. After that: no more complaining
> about ownership, but also no output whatsoever! Just a quiet cursor quietly
> entering a new line, that's all. And of course no action is done either.
> 
> So, how to make ddclient work on Alpine? Right now I have no idea. :(
> 
> 
> 
> 

You should not change the shell for the ddclient user.  The fact that
the shell is /sbin/nologin means that the user is not supposed to log in
(interactively). It's a security measure. If you have neither "sudo" nor
"doas", you can use "su" to run the command as the ddclient user via the
root account:

	su -c 'su -p ddclient -c "ddclient -debug -verbose"'

Or, if you are already root:

	su -p ddclient -c 'ddclient -debug -verbose'

The "-p" avoids invoking the user's nologin shell.

Even if I was familiar with the software, it would probably be very
difficult to help you without knowing anything about your configuration.

Glancing at the documentation (https://ddclient.net/), it seems like the
"-daemon=0" and "-noquiet" are set by default, so it's not clear why
you need to set them explicitly.  The rest of the configuration is read
from the configuration file, and you haven't shown us that file (if you
post it, ensure to redact any sensitive information, like passwords and
usernames).


-- 
Matti Andreas Kähäri
Uppsala, Sweden

.
Wolfgang Klein <klein.wolfg@web.de>
Details
Message ID
<221ee620-9d58-49cd-b51e-77f4e78f32bb@web.de>
In-Reply-To
<aOuVyvX1Q9Y2MIlz@eeyore.invalid> (view parent)
DKIM signature
missing
Download raw message
Andreas Kähäri wrote:

> You should not change the shell for the ddclient user.  The fact that

Yes, you're right, but...

> 	su -p ddclient -c 'ddclient -debug -verbose'
>
> The "-p" avoids invoking the user's nologin shell.

...I did not know this. Shame on me!

>
> Glancing at the documentation (https://ddclient.net/), it seems like the
> "-daemon=0" and "-noquiet" are set by default, so it's not clear why
> you need to set them explicitly.

Well, I assumed that the option "-daemon=0" would not start a daemon, 
but would just run the command once and exit. It's what the zero 
suggests, isn't it? ;)


> The rest of the configuration is read
> from the configuration file, and you haven't shown us that file (if you
> post it, ensure to redact any sensitive information, like passwords and
> usernames).
>
>

Here's the configuration file, copied from another machine, where 
ddclient is running successfully and which is taken from the 
installation instructions on dnshome.de:


#usev4=webv4,webv4=ipify-ipv4
ssl=yes
daemon=3600
use=web, web=ip.dnshome.de
syslog=yes
# Protocol
protocol=dyndns2
server=www.dnshome.de
login=myserver.dnshome.de
password=mypassword
myserver.dnshome.de


I already learned that many things are different on Alpine, so I guess I 
will have to adjust that file.
Reply to thread Export thread (mbox)