Skip to contentSkip to conversation

Proper location for user-specific OpenVPN configuration files used by OpenVPN-GUI?

Openvpn-devel Samuli Seppänen 8 participants 15 messages Oct 19, 2016 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

While preparing OpenVPN 2.4-alpha1 release the discussion about user-specific OpenVPN configuration files came up again. To give some background, OpenVPN-GUI can now delegate privileged operations (e.g. route adding) to the OpenVPN Interactive Service. This means that normal users are now able to launch OpenVPN connections without having admin privileges. On top of that, users can now store OpenVPN configuration files in their home directory, under %USERPROFILE%\OpenVPN\config[*]. The rationale for this directory choice was discussed here:

<https://github.com/OpenVPN/openvpn-gui/pull/18#issuecomment-190138431>

Three directory alternatives have been proposed:

%USERPROFILE%\OpenVPN\config (current approach)
%APPDATA%\OpenVPN\config
%USERPROFILE%\.openvpn\config

People seem to agree that %APPDATA%\OpenVPN\config would be the most "proper" place for the configuration files. The fear was that people don't know about it, and will not thus find it. Of course the location would be documented, but people probably would not read the documentation and would get confused.

There also seems to be agreement that using %USERPROFILE%\OpenVPN\config (=current approach) is rather invasive. However, it has the benefit that users might actually find it without reading the documentation.

*NIX guys would love %USERPROFILE%\.openvpn\config, and it kind of makes sense for a cross-platform app, but Windows guys would probably be at loss.

So what should be do with this? Any directory we choose we have to live with for a long time - replacing it with something else would break setups for lots of users.

I'd like to finish the OpenVPN-2.4_alpha1 release tomorrow, so I hope we can go through the bikeshedding today :).

Best regards,

Signature · 7 lines
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock

[*] With the caveat that they need to be either in the built-in administrator group, or in "OpenVPN administrators" group, to actually use OpenVPN configurations stored in their home directory.
#1 lore raw

Hi,

Quoted 2 lines · Samuli Seppänen

*NIX guys would love %USERPROFILE%\.openvpn\config, and it kind of makes sense for a cross-platform app, but Windows guys would probably be at loss.

Now *this* does not make sense on Windows - and since this is about windows gui behaviour, let's not go there.

As for the other two options, I'm neutral.

(And I want a green pony)

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#2 lore raw
In reply to Samuli Seppänen
Quoted 11 lines · Samuli Seppänen

Hi,

While preparing OpenVPN 2.4-alpha1 release the discussion about user-specific OpenVPN configuration files came up again. To give some background, OpenVPN-GUI can now delegate privileged operations (e.g. route adding) to the OpenVPN Interactive Service. This means that normal users are now able to launch OpenVPN connections without having admin privileges. On top of that, users can now store OpenVPN configuration files in their home directory, under %USERPROFILE%\OpenVPN\config[*]. The rationale for this directory choice was discussed here:

Quoted 7 lines

<https://github.com/OpenVPN/openvpn-gui/pull/18#issuecomment-190138431>

Three directory alternatives have been proposed:

%USERPROFILE%\OpenVPN\config (current approach)
%APPDATA%\OpenVPN\config
%USERPROFILE%\.openvpn\config

"When in Rome do as the Romans" ....

which means the .openvpn approach is just plain silly in Windows. Hidden files and directories start on *nix with a dot/punctuation in the file/dir name; Windows does not do that as it uses separate attributes tackling this.

%APPDATA% is what I belive the majority of Windows applications uses today.

The %USERPROFILE% approach I'm a bit more reluctant to.

But this is just my personal opinions, coming from a person who haven't really used Windows in 15 years++. But I do think consistency with what others do is of a bigger value. Windows users who tinkle with slightly more advanced stuff knows where to find %APPDATA%. Windows users who don't know that should most likely not even enter the OpenVPN config directory at all.

That's my 2cents to the shed painting funding ...

Signature · 3 lines
kind regards,

David Sommerseth
#3 lore raw
In reply to Samuli Seppänen

Am 19.10.16 um 15:04 schrieb Samuli Seppänen:

Quoted 11 lines

Hi,

While preparing OpenVPN 2.4-alpha1 release the discussion about user-specific OpenVPN configuration files came up again. To give some background, OpenVPN-GUI can now delegate privileged operations (e.g. route adding) to the OpenVPN Interactive Service. This means that normal users are now able to launch OpenVPN connections without having admin privileges. On top of that, users can now store OpenVPN configuration files in their home directory, under %USERPROFILE%\OpenVPN\config[*]. The rationale for this directory choice was discussed here:

Quoted 7 lines

<https://github.com/OpenVPN/openvpn-gui/pull/18#issuecomment-190138431>

Three directory alternatives have been proposed:

%USERPROFILE%\OpenVPN\config (current approach)
%APPDATA%\OpenVPN\config
%USERPROFILE%\.openvpn\config

Nobody wants that. That will confuse everyone. Even UNIX have learned that windows uses %APPDATA% instead of that unix hack of dot files.

Quoted 4 lines

People seem to agree that %APPDATA%\OpenVPN\config would be the most "proper" place for the configuration files. The fear was that people don't know about it, and will not thus find it.

I think if a user should create OpenVPN\config in its home or just tell them to do Windows Key+R, enter %appdata%\openvpn\config shouldn't matter. And the really clueless can still put it into C:\program files\OpenVPN\config.

And even this is not really needed since we have a Import config function in the UI that will copy it to the right place.

And most applications are using that folder. Why should we be special?

Quoted 3 lines

Of course the location
would be documented, but people probably would not read the documentation and would get confused.

Tunnelblick on OSX also keeps its config files in ~/Library/Application Support/Tunnelblick/Configurations

It also ask you when you double click on a ovpn file if you want to import it. Windows UI also has an import functionality that will place into the right folder.

Quoted 6 lines

There also seems to be agreement that using %USERPROFILE%\OpenVPN\config (=current approach) is rather invasive. However, it has the benefit that users might actually find it without reading the documentation.

*NIX guys would love %USERPROFILE%\.openvpn\config, and it kind of makes sense for a cross-platform app, but Windows guys would probably be at loss.

Mac OS X also does not use dotfiles.

Quoted 6 lines

So what should be do with this? Any directory we choose we have to live with for a long time - replacing it with something else would break setups for lots of users.

I'd like to finish the OpenVPN-2.4_alpha1 release tomorrow, so I hope we can go through the bikeshedding today :).

I vote for %APPDATA%

Arne

#14 lore raw
In reply to Samuli Seppänen
Quoted 6 lines

Three directory alternatives have been proposed:

%USERPROFILE%\OpenVPN\config (current approach)
%APPDATA%\OpenVPN\config
%USERPROFILE%\.openvpn\config

I vote for %USERPROFILE%, as it is more intuitive.

%APPDATA% seems to be a folder for a files generated solely by software, and not for things which user may want to put manually like VPN configs. I have just checked - %APPDATA% is even a hidden folder on my machine. And yes, I don't trust the import function, cause I don't know what it will do in some situations, especially when certs are stored in external files, or there are up\down scripts that should also be copied, or...

".openvpn" - definitely NO. It looks just ugly. Even Linux doesn't use that for configuration folders (remember /etc/openvpn?).

--
SviMik

#4 lore raw
In reply to Arne Schwabe

Hi,

Am 19.10.16 um 15:04 schrieb Samuli Seppänen:

Quoted 10 lines
Quoted 10 lines

Hi,

While preparing OpenVPN 2.4-alpha1 release the discussion about user-specific OpenVPN configuration files came up again. To give some background, OpenVPN-GUI can now delegate privileged operations (e.g. route adding) to the OpenVPN Interactive Service. This means that normal users are now able to launch OpenVPN connections without having admin privileges. On top of that, users can now store OpenVPN configuration files in their home directory, under %USERPROFILE%\OpenVPN\config[*]. The rationale for this directory choice was discussed here:

The reason for that rather improper choice of %USERPROFILE%\OpenVPN\config was that the current import functionality is rather limited and does not handle any dependent files like ca/cert/key/scripts --- it works well when everything is inline. So we wanted the config folder to be easily accessible/visible for users who need to manually copy additional files.

But the chosen location is indeed very intrusive and I too think we should change it.

Quoted 3 lines · Arne Schwabe

I vote for %APPDATA%

David Sommerseth <[email protected]...> wrote:

"When in Rome do as the Romans"

Looks like there is a general consensus on this. If so, I will post a patch later today to use %APPDATA%

Selva

#5 lore raw

Il 19/10/2016 18:08, Selva Nair ha scritto:

Quoted 36 lines

Hi,

Am 19.10.16 um 15:04 schrieb Samuli Seppänen:

Quoted 6 lines

Hi,

While preparing OpenVPN 2.4-alpha1 release the discussion about user-specific OpenVPN configuration files came up again. To give some background, OpenVPN-GUI can now delegate privileged operations (e.g. route adding) to the OpenVPN Interactive Service. This means that

normal
> users are now able to launch OpenVPN connections without having admin > privileges. On top of that, users can now store OpenVPN configuration > files in their home directory, under %USERPROFILE%\OpenVPN\config[*]. > The rationale for this directory choice was discussed here:

The reason for that rather improper choice
of %USERPROFILE%\OpenVPN\config was that the current import functionality is rather limited and does not handle any dependent files like ca/cert/key/scripts --- it works well when everything is inline. So we wanted the config folder to be easily accessible/visible for users who need to manually copy additional files.

But the chosen location is indeed very intrusive and I too think we should change it.

Arne Schwabe <[email protected]... <mailto:[email protected]...>> wrote:

I vote for %APPDATA%

David Sommerseth <[email protected]...
<mailto:[email protected]...>> wrote:

Quoted 7 lines

"When in Rome do as the Romans"

Looks like there is a general consensus on this. If so, I will post a patch later today to use %APPDATA%

Selva

SviMik had a very good point against using %APPDATA%: it is a hidden folder. At least on Windows 7 it seems to be hidden at the filesystem level, because no tools seem to see it. However, doing a

cd $HOME\Appdata

in Powershell will work, so the directory _is_ there even though it is invisble.

I don't think we should put the configuration files into folder people will not find without extra tinkering.

Signature · 5 lines
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock
#6 lore raw
Quoted 11 lines · Samuli Seppänen

SviMik had a very good point against using %APPDATA%: it is a hidden folder. At least on Windows 7 it seems to be hidden at the filesystem level, because no tools seem to see it. However, doing a

cd $HOME\Appdata

in Powershell will work, so the directory _is_ there even though it is invisble.

I don't think we should put the configuration files into folder people will not find without extra tinkering.

Maybe add an 'open config folder' button/link to openvpn-gui?

-Steffan

#7 lore raw
Quoted 1 line

Maybe add an 'open config folder' button/link to openvpn-gui?

Sounds like a good idea in any case!
Why it hasn't been done, like, 10 years ago? :D I spent sooo much time opening the C:\Program Files\OpenVPN\config !

But my vote is still for %USERPROFILE%.

--
SviMik

#13 lore raw
In reply to Samuli Seppänen

Hi,

Quoted 11 lines · Samuli Seppänen
Quoted 6 lines

Looks like there is a general consensus on this. If so, I will post a patch later today to use %APPDATA%

Selva

SviMik had a very good point against using %APPDATA%: it is a hidden folder. At least on Windows 7 it seems to be hidden at the filesystem level, because no tools seem to see it. However, doing a

Quoted 9 lines

cd $HOME\Appdata

in Powershell will work, so the directory _is_ there even though it is invisble.

I don't think we should put the configuration files into folder people will not find without extra tinkering.

As the UI improves with functionality to properly edit/tweak configs, make new configs, import dependent files etc., the need for direct tinkering will decrease. We could add a menu option to navigate to the config folder, but not sure how well that works with hidden folders.

Also note that use of %APPDATA% actually means %APPDATA%\Local (or %APPDATA%\Roaming if domain users need to see the same configs no matter where the login from, which I do not think is necessary or proper in this case).

Selva

#8 lore raw
In reply to Steffan Karger

Il 19/10/2016 18:17, Steffan Karger ha scritto:

Quoted 10 lines · Samuli Seppänen
Quoted 9 lines

SviMik had a very good point against using %APPDATA%: it is a hidden folder. At least on Windows 7 it seems to be hidden at the filesystem level, because no tools seem to see it. However, doing a

cd $HOME\Appdata

in Powershell will work, so the directory _is_ there even though it is invisble.

Quoted 7 lines
Quoted 2 lines

I don't think we should put the configuration files into folder people will not find without extra tinkering.

Maybe add an 'open config folder' button/link to openvpn-gui?

-Steffan

Sounds reasonable.

The "%USERPROFILE%\Appdata" folder seems to be for "files generated by applications" as SviMik said:

<https://technet.microsoft.com/en-us/library/cc962614.aspx>
<https://technet.microsoft.com/en-us/library/cc749104%28v=ws.10%29.aspx>

Those links refer to Windows XP's equivalent for $HOME\Appdata, but the purpose of the directory has not changed afaik.

Things are complicated a bit more by the fact that the %APPDATA% environment variable points to %USERPROFILE%\Appdata\Roaming, not %USERPROFILE%\Appdata as one might think.

In the first link above, MS says this:

"CSIDL_PROFILE: The user's profile folder. A typical path is C:\Documents and Settings\username. Applications should not create files or folders at this level; they should put their data under the locations referred to by CSIDL_APPDATA or CSIDL_LOCAL_APPDATA."

I think the idea Microsoft thought that users should not (have to) touch the Appdata folder, and thus decided to hide it.

I vote for using a directory that is visible by default, at least until the GUI can reliably import any config thrown at it.

Signature · 5 lines
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock
#12 lore raw
In reply to Steffan Karger
Quoted 7 lines · Steffan Karger
Quoted 6 lines · Samuli Seppänen

SviMik had a very good point against using %APPDATA%: it is a hidden folder. At least on Windows 7 it seems to be hidden at the filesystem level, because no tools seem to see it. However, doing a

cd $HOME\Appdata

Quoted 7 lines
Quoted 5 lines

in Powershell will work, so the directory _is_ there even though it is invisble.

I don't think we should put the configuration files into folder people will not find without extra tinkering.

Maybe add an 'open config folder' button/link to openvpn-gui?

I think this is hard to do for hidden folders without tinkering with users preferences for showing hidden files/folders.

Selva

#15 lore raw
In reply to Samuli Seppänen
Quoted 9 lines · Samuli Seppänen

Hi,

Three directory alternatives have been proposed:

%USERPROFILE%\OpenVPN\config (current approach)
%APPDATA%\OpenVPN\config
%USERPROFILE%\.openvpn\config

I find the whole idea of "Hiding things from users" to be an unnecessary and pointless exercise .. Especially with regard to configuration files, which you are specifically handing over to users by creating the interactive service.

My Vote:
%USERPROFILE%\.openvpn\config

Regards

#10 lore raw
In reply to a message not in the archive
Quoted 14 lines · Samuli Seppänen

The "%USERPROFILE%\Appdata" folder seems to be for "files generated by applications" as SviMik said:

<https://technet.microsoft.com/en-us/library/cc962614.aspx>
<https://technet.microsoft.com/en-us/library/cc749104%28v=ws.10%29.aspx>

Those links refer to Windows XP's equivalent for $HOME\Appdata, but the purpose of the directory has not changed afaik.

Things are complicated a bit more by the fact that the %APPDATA% environment variable points to %USERPROFILE%\Appdata\Roaming, not %USERPROFILE%\Appdata as one might think.

Quoted 7 lines

In the first link above, MS says this:

"CSIDL_PROFILE: The user's profile folder. A typical path is C:\Documents and Settings\username. Applications should not create files or folders at this level; they should put their data under the locations referred to by CSIDL_APPDATA or CSIDL_LOCAL_APPDATA."

CSIDL_APPDATA goes into the roaming profile and is preferred if the config is user specific and not at all machine-specific. If/when we go this route, I think CSIDL_LOCAL_APPDATA would be more appropriate for vpn configs.. Also we keep log files in there which could grow large and adversely affect roaming performance.

Quoted 8 lines

I think the idea Microsoft thought that users should not (have to) touch the Appdata folder, and thus decided to hide it.

I vote for using a directory that is visible by default, at least until the GUI can reliably import any config thrown at it.

Yes, we could revisit this and add code for migrating existing files if a change in location is required.

Selva

#11 lore raw
In reply to a message not in the archive

Il 19/10/2016 19:27, Selva Nair ha scritto:

Quoted 40 lines

On Wed, Oct 19, 2016 at 11:46 AM, Samuli Seppänen <[email protected]... <mailto:[email protected]...>> wrote:

The "%USERPROFILE%\Appdata" folder seems to be for "files generated by applications" as SviMik said:

<https://technet.microsoft.com/en-us/library/cc962614.aspx
<https://technet.microsoft.com/en-us/library/cc962614.aspx>>
<https://technet.microsoft.com/en-us/library/cc749104%28v=ws.10%29.aspx
<https://technet.microsoft.com/en-us/library/cc749104%28v=ws.10%29.aspx>>

Those links refer to Windows XP's equivalent for $HOME\Appdata, but the purpose of the directory has not changed afaik.

Things are complicated a bit more by the fact that the %APPDATA% environment variable points to %USERPROFILE%\Appdata\Roaming, not %USERPROFILE%\Appdata as one might think.

In the first link above, MS says this:

"CSIDL_PROFILE: The user's profile folder. A typical path is C:\Documents and Settings\username. Applications should not create files or folders at this level; they should put their data under the locations referred to by CSIDL_APPDATA or CSIDL_LOCAL_APPDATA."

CSIDL_APPDATA goes into the roaming profile and is preferred if the config is user specific and not at all machine-specific. If/when we go this route, I think CSIDL_LOCAL_APPDATA would be more appropriate for vpn configs.. Also we keep log files in there which could grow large and adversely affect roaming performance.

I think the idea Microsoft thought that users should not (have to) touch the Appdata folder, and thus decided to hide it.

Quoted 8 lines

I vote for using a directory that is visible by default, at least until the GUI can reliably import any config thrown at it.

Yes, we could revisit this and add code for migrating existing files if a change in location is required.

Selva

+1. Lets just use what we have now: all the alternatives have their own downsides.

Signature · 5 lines
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock