Windows Server Mode Cannot Save Logs

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
klabaza
OpenVpn Newbie
Posts: 7
Joined: Thu Aug 18, 2011 4:15 pm

Windows Server Mode Cannot Save Logs

Post by klabaza » Thu Nov 16, 2023 3:02 am

Hello people.

I'm running OpenVPN server on a Windows11 box, is working but I see the logs and I still don't fix this issue related to the logs files.

Image

U can see that the logs, ovpn cannot open thos files and they exist.

Latter I move the files to:

c:\openvpn\log\

Now I can see info in my files except openvpn.log.

Is still empty but don't see any error in the log screen.

Running latest version 2.6.7 Under Windows 11 Pro.

Any tip that could help me fix this issue :?: Regards!!!

User avatar
PetervdM
OpenVpn Newbie
Posts: 8
Joined: Fri Apr 08, 2022 8:59 am

Re: Windows Server Mode Cannot Save Logs

Post by PetervdM » Thu Nov 16, 2023 12:33 pm

the path or file may be read-only. you might flag the "c:\program files\OpenVPN\log" directory read/write - so remove the read only attribute.
if files exists in the folder you may have to remove the read-only attribute of them too

User avatar
PetervdM
OpenVpn Newbie
Posts: 8
Joined: Fri Apr 08, 2022 8:59 am

Re: Windows Server Mode Cannot Save Logs

Post by PetervdM » Fri Nov 17, 2023 9:10 pm

v2.6.8 just emerged. from the changelog:
"Windows: fix status/log file permissions, caused by regression after changing to CMake build system (Github: #454, Trac: #1430)"

klabaza
OpenVpn Newbie
Posts: 7
Joined: Thu Aug 18, 2011 4:15 pm

Re: Windows Server Mode Cannot Save Logs

Post by klabaza » Mon Nov 20, 2023 8:45 pm

Looks like I understand how the logs works under windows.

Example: my server config file is called "fantasy_srv.ovpn".

Once u start the service, OpenVPN save the log file called "fantasy_srv.log" inside the user where the services is running, example user3:

"C:\Users\user3\OpenVPN\log"

There u will see a file called "fantasy_srv.log".

Won't matter if have the parameters, he just won't used:

status -> path
log -> path
log-append ->path

It won't used, openvpn goes and save the log file inside each user own path to OpenVPN.

This is not related to folder or file persmisions.

I update the app to the latest 2.6.8 x64.

Regards!!!

Darsh
OpenVpn Newbie
Posts: 3
Joined: Sun Nov 12, 2023 4:08 pm

Re: Windows Server Mode Cannot Save Logs

Post by Darsh » Tue Nov 21, 2023 8:18 am

PetervdM wrote:
Thu Nov 16, 2023 12:33 pm
the path or file may be read-only. you might flag the "c:\program files\OpenVPN\log" directory read/write - so remove the read only attribute.
if files exists in the folder you may have to remove the read-only attribute of them too
Check for the existence of files in the folder. If found, ensure read-only attribute is removed to allow necessary modifications or deletions.

Post Reply