Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I had posted about this a while ago but had a few new questions with some comments that I would really appreciate some input on.

I am using a custom OpenVPN install using 7zip. It installs the program and unzips the keys and configuration files to the correct location. This is being installed by an administrator and needs to work for non admin users. Before there was an issue about not pushing the routes correctly and I am going to get around that by adding the users to the Network Config group which will allow them to add routes but not a whole lot more power. Now I am getting the error "Error opening logfile for writing C:\Program Files\OpenVPN\log\client.log. You probably don't have administrator privileges, which are necessary to run OpenVPN." Is there anyway around this? OpenVPN still works even though this error occurs so is there anyway to just turn the error off (changing verb to 0 does not work) or recompile it to ignore this error? Is there anyway to change the logging location to event viewer or another directory such as C:\Users\%currentuser%\OpenVPN.log (when I try to do this with log or log-append option it throws another error and doesn't work so I would prefer event viewer so there wouldn't be any permission issues).

I really appreciate any input. We are getting closer on wanting to deploy on a wider scale and this is the last major obstacle.

share|improve this question

3 Answers 3

Looking at my Win7 pro install, regular users do not have the right to write to files in c:\program files\openvpn (or any directory in Program Files for that matter) by default. Not sure of XP. You'll need to adjust the permissions either on the log file itself and/or the openvpn directory.

You could try using the cacls or icacls command in an install script to change the permissions of the file/directory.

share|improve this answer
    
It's just a problem with the user-rights on that logfile, I had similar issues with OpenVPN. –  Phil Swiss Jan 6 '10 at 21:30
    
Exactly, that's why I mentioned changing the rights on the file during setup. –  David Jan 7 '10 at 14:05

Could you add a script, installation step or group policy to change the permissions on that file to writeable by Everybody?

share|improve this answer
    
I was thinking about that, and just adding access to the log directory for the Network Configurations group since they will have to be a member of that anyway. Was just trying to figure out the best way to do that. Need something that is going to be already installed on all XP, Vista, and 7 machines that I can batch script. –  user22492 Jan 5 '10 at 18:07

Windows7 onwards have this problem that the local administrator of the OS is by default disabled (for security concerns). What I suggest is you always run the setup of OpenVPN by using right-click and "run as administrator". Even after the install, always run the OpenVPN GUI using this method. That way the OS will allow the application to add the routes in it's own routing table, pushed by the OpenVPN Server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.