Bad UID GID in files with vpnclient

What app is this about, and its version: Vpn Client 2.3~ynh7
What YunoHost version are you running: 12.1.39
What type of hardware are you using: Old laptop or computer

Describe your issue

Hello,
I am using a vpn from long time, today I discover there bad UID:GID on files. The vpn is working but the owners on some files is from other apps !!

So I want put the corrects owners here but I am not sure if it may be vpnclient:vpnclient or root:vpnclient or perhaps root:root

Could someone tell me ?

Thanks

Share relevant logs or error messages

/etc/openvpn# ls -l
total 28
drwxr-xr-x 2 root       root      4096 Nov 11  2023 client
-rw------- 1 borgserver anarchism 1041 Nov 24 17:07 client.conf
-rw------- 1 root       root      1021 Nov 24 17:07 client.ovpn
drwx------ 2 vpnclient  vpnclient 4096 Mar 31  2024 keys
drwxrwxrwx 4 root       root      4096 Nov 24 17:07 scripts
drwxr-xr-x 2 root       root      4096 Nov 11  2023 server
-rwxr-xr-x 1 root       root      1468 Nov 11  2023 update

/etc/openvpn# ls -l keys/
total 8
-rw------- 1 borgserver anarchism 2395 Mar 31  2024 ca-server.crt
-rw------- 1 borgserver anarchism   24 Feb  1  2024 credentials

/etc/openvpn# ls -lda
drwxrwxr-x 6 root vpnclient 4096 Dec  6 20:44 .

I see in the repo for the files in the folder keys chown ${app}:${app} /etc/openvpn/keys/ but what about the file client.conf ??

Do you add this file via webadmin ?

I think so…

I remember have got a similar trouble of uid gid in this server with other files, othe app… but time ago…

I imagine the keys should own to vpnclient:vpnclient isn’t it ?

So it should be $app:$app

Changes in files ownership ? This happens tons of times :scream:

I don’t like this… Time ago I have got some trouble similar and Aleks help me, he said perhaps when migrating from other computer, this server works since the first versions of yunohost but migrated on different machines…

are you sure, did you have a vpnclient to verify ??

Sure, no.
Maybe I can try with a fake config.cube ?

drwxr-x---   6 redirect__2      redirect__2      4096  4 nov.  18:58 photoprism
drwxr-x---   5 wanderer         wanderer         4096 17 janv. 01:36 radarr
drwxr-x---   4 readeck          readeck          4096 18 sept. 18:16 readeck
drwxrwx---   3 peertube         peertube         4096 29 oct.  22:21 sabnzbd
drwxrwxr-x+  5 redirect         redirect         4096 25 oct.  11:46 sabnzbd__2
drwxrwxr-x+  5 redirect__2      redirect__2      4096 25 oct.  11:34 sabnzbd__3

in /home/yunohost.app
For sure, these are non-removed data_dir of removed apps…
Who’s the odd one out? :grinning_face_with_smiling_eyes:

Openvpn fresh install gives :

ls -la openvpn
total 36
drwxrwxr-x   6 root      vpnclient  4096  2 févr. 00:30 .
drwxr-xr-x 161 root      root      12288  2 févr. 00:30 ..
drwxr-xr-x   2 root      root       4096 26 nov.  22:54 client
drwx------   2 vpnclient vpnclient  4096  2 févr. 00:30 keys
drwxrwxr-x   4 root      root       4096  2 févr. 00:30 scripts
drwxr-xr-x   2 root      root       4096 26 nov.  22:54 server
-rwxr-xr-x   1 root      root       1468 26 nov.  22:54 update-resolv-conf

After processing a config.cube (with “1234” as content…) :

drwxrwxr-x   6 root      vpnclient  4096  2 févr. 00:33 .
drwxr-xr-x 161 root      root      12288  2 févr. 00:30 ..
drwxr-xr-x   2 root      root       4096 26 nov.  22:54 client
-rw-------   1 vpnclient vpnclient   230  2 févr. 00:33 client.conf
-rw-------   1 root      root          9  2 févr. 00:33 client.ovpn
drwx------   2 vpnclient vpnclient  4096  2 févr. 00:33 keys
drwxrwxr-x   4 root      root       4096  2 févr. 00:30 scripts
drwxr-xr-x   2 root      root       4096 26 nov.  22:54 server
-rwxr-xr-x   1 root      root       1468 26 nov.  22:54 update-resolv-conf

Tough day with openvpn…

Ok, I remember how look on another server with vpn client, so I found that the file client.conf own as you have seen to vpnclient:vpnclient and also the files in the folder keys . Thanks for help me… I could resolve this little inconvenient issue

But I have still others issues !! with uid:gid !!

 ls -ll /home/yunohost.app/
total 12
drwxr-x---  3 mobilizon mobilizon 4096 Jul 15  2025 mobilizon
drwxr-x--- 10 nextcloud nextcloud 4096 Jul 16  2022 nextcloud
drwxr-x---  3 borg      www-data  4096 Oct 22  2024 paheko

I have a trouble somewhere !! well, here is an app removed… the data folder stay here but the app paheko is removed… I have to stop doing some tests on this production home server…


set_permissions() {
    local file="$1"
    if [ -f $file ]
    then
        chown $app:$app $file
        chmod go=--- $file
    fi
}
(...)
    set_permissions /etc/openvpn/client.conf

Well, paheko user was removed too, so it can no longer own any folder.
The question is: how is the ownership reassigned ?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.