Skip to content

Commit bea7850

Browse files
authored
Merge pull request #51 from shingo78/fix/course-content-dir-permissions
Fix incorrect course content directory permissions on the first launch
2 parents b162b8c + f4fa7b5 commit bea7850

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

jupyterhub/cwh-repo2docker/cwh_repo2docker/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,10 @@ def _make_user_course_dirs(self):
300300

301301
def _make_dir(self, dirpath, mode, uid, gid):
302302
try:
303-
os.mkdir(dirpath, mode)
303+
os.mkdir(dirpath)
304304
except FileExistsError:
305-
os.chmod(dirpath, mode)
305+
pass
306+
os.chmod(dirpath, mode)
306307
os.chown(dirpath, uid, gid)
307308

308309
async def create_object(self, *args, **kwargs):

0 commit comments

Comments
 (0)