lensfun-update-data does not update system-wide data, even when running as root (for example, under su or sudo). The problem is that it uses the getpass.getuser() function, which looks at the environment variables such as USER and USERNAME instead of checking the UID under which the process is running.
The shortest possible patch attached. However, maybe the sys.platform != "win32" check should also be changed to os.name == "posix" instead. See the documentation at
https://docs.python.org/2/library/os.html#os.name
For the reference, I have originally reported it downstream to Fedora bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1242826
Thank you, I applied your changes. Apparently under Ubuntu, the old way actually worked.