Do not set ownership in create_certs

Most Authenticators do not have local users, so this doesn't make sense at this stage
This commit is contained in:
Min RK
2018-09-28 11:02:05 +02:00
parent f29354e0f4
commit c3176b0ca3

View File

@@ -744,19 +744,8 @@ class Spawner(LoggingConfigurable):
paths = {
"keyfile": notebook_key_pair['files']['key'],
"certfile": notebook_key_pair['files']['cert'],
"cafile": self.internal_trust_bundles[notebook_component]
"cafile": self.internal_trust_bundles[notebook_component],
}
try:
user = pwd.getpwnam(self.user.name)
uid = user.pw_uid
gid = user.pw_gid
for f in ['keyfile', 'certfile']:
shutil.chown(paths[f], user=uid, group=gid)
except KeyError:
self.log.info("User {} not found on system, "
"unable to change ownership".format(self.user.name))
return paths
def move_certs(self, paths):