openvpn-install icon indicating copy to clipboard operation
openvpn-install copied to clipboard

Permissions for user generated .ovpn client files

Open Toilal opened this issue 2 years ago • 0 comments

Checklist

  • [x] I read the README
  • [x] I read the FAQ
  • [x] I searched the issues
  • [x] My issue is about the script, and not OpenVPN itself

Is your feature request related to a problem? Please describe.

When generating client file with for a user, it is generated in home directory of the user. That's a good idea, but file permissions doesn't match the generated user, it's owned by root and user can't edit or delete the file on it's own.

Describe the solution you'd like When generating a client file for a user, it should set security flags according to the related user, for him to be the owner and the file can't be read by other users.

chmod go-rw $CLIENT.ovpn
chown $CLIENT $CLIENT.ovpn

Describe alternatives you've considered

Additional context

Toilal avatar Jan 19 '22 14:01 Toilal