#1430 closed Bug / Defect (fixed)

openvpn 2.5.4 under Windows "status"

Reported by: joks Owned by:
Priority: critical Milestone: release 2.5.5
Component: Generic / unclassified Version: OpenVPN 2.5.4 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords: status fails


i have few OpenVPN Servers running under Windows x64.
After update from version 2.5.3 to new 2.5.4 on all machines when i restart Windows (after Windows Update) or after manual restart "OpenVPNService" in services.msc OpenVPN will fails to run. i change verbose from 4 to 9 but only one error appears in logs:

options error: --status fails with 'C:\Program Files\OpenVPN\log\status.log' Unknown error (errno=183)

I noticed that OpenVPNService will run when i manual delete file status.log but it works only to second machine restart so for now the only way under Windows is disable status in openvpn server config file. i use openvpn for about 2 years and in previous release like 2.5.0 or 2.5.2 even in 2.4 I did not have such problems so surely the change in version 2.5.4 introduced some error.

Change History (8)

comment:1 Changed 18 months ago by Selva Nair

The error seems to indicate access check on the status.log file failed during options parsing. This is strange if the file is created by the service account in a previous run. Can you check what are the permissions on the existing status.log file when OpenVPN fails to start with the above error?

comment:2 Changed 18 months ago by joks

the file is created with permissions read-only. when i remove these permissions OpenVPNService will run but after service restart or computer restart file is again read-only :/

comment:3 Changed 18 months ago by tct

Well, I just tested this and it is true.

The status file is created as readonly! (Win7 Server 32bit)

I also tested the same config file via the GUI and it also creates the file as readonly.

Last edited 18 months ago by tct (previous) (diff)

comment:4 Changed 18 months ago by Selva Nair

I think its caused by S_IRUSR and S_IWUSR hard coded to 0 in config-msvc.h. See patch sent to the list -- I haven't tested it though.

On Windows all files get read permission by default, but not sure why _wopen() doesn't return error (fd=-1) when an "illegal" mode is specified. May be it just always adds the default _S_IREAD converting 0 to 0400.

Last edited 18 months ago by Selva Nair (previous) (diff)

comment:5 Changed 17 months ago by Selva Nair

Fixed by: commit c699c0d85cf2028796cdb0592271f1167709e6ac
Date: Fri Oct 15 14:47:33 2021 -0400

Fix some more wrong defines in config-msvc.h

comment:6 Changed 17 months ago by Gert Döring

Milestone: release 2.5.4release 2.5.5
Version: OpenVPN 2.5.4 (Community Ed)

comment:7 Changed 17 months ago by Gert Döring

2.5.4-I604 has been released. Please test, and report.

comment:8 Changed 14 months ago by Gert Döring

Resolution: fixed
Status: newclosed

We are reasonably sure that this bug has been fixed in 2.5.4-I604 and also in 2.5.5-I602.

Thus, closing this ticket, even if we never got feedback.

Note: See TracTickets for help on using tickets.