People: |
|
---|
HUE-9522 [useradmin] fix user home folder creation to use umask
Review Request #15528 — Created Oct. 29, 2020 and submitted
Information | |
---|---|
quadoss | |
hue | |
master | |
HUE-9522 | |
Reviewers | |
hue | |
asnaik, johan, ranade, romain, weixia, yingc |
commit f63c013f0ffb69d84afa302794eec107a6608fe7 Author: Mahesh Balakrishnan <mbalakrishnan@cloudera.com> Date: Thu Oct 29 20:20:57 2020 -0700 HUE-9522 [useradmin] fix user home folder creation to use umask :100644 100644 bc948b4a10 fc23576e3e M apps/useradmin/src/useradmin/conf.py :100644 100644 a15cb60377 ec7fd82ca1 M desktop/conf.dist/hue.ini :100644 100644 6f207868b5 2b4e908c85 M desktop/conf/pseudo-distributed.ini.tmpl :100644 100644 2bc8d80898 ff71af4c94 M desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py
Tested this on 2 different cluster internally
1. With the default flag, saw the home dir getting created with 755 permission. (correct permission)
2. Changed the fs.permissions.umask-mode in hdfs to 027 and kept the flag as default and saw the new user home dir with 755. (correct permission)
3. Added the flag and set it to false in useradmin under hue safety value in cm (fs.permissions.umask-mode=027), created a new user and saw the permission as 750 (correct permission)
-
-
-
desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py (Diff revision 1) USE_HOME_DIR_PERMISSIONS.get() == True --> USE_HOME_DIR_PERMISSIONS.get() `int(HOME_DIR_PERMISSIONS.get(), 8) if USE_HOME_DIR_PERMISSIONS.get() else (0o777 & (0o1777 ^ get_umask_mode()))`
Change Summary:
fixed pylint issues below
[12/Nov/2020 11:03:34 -0800] runpylint INFO Running pylint with args: /usr/share/hue/build/env/bin/pylint --rcfile=/usr/share/hue/.pylintrc --disable=all --enable=C0326,W0311,C0301 --load-plugins=pylint_django -f parseable apps/useradmin/src/useradmin/conf.py desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py
*** Module useradmin.conf
apps/useradmin/src/useradmin/conf.py:47: [C0326(bad-whitespace), ] No space allowed around keyword argument assignment
IS_ENABLED = Config(
^
apps/useradmin/src/useradmin/conf.py:53: [C0326(bad-whitespace), ] No space allowed around keyword argument assignment
PWD_RULE = Config(
^
apps/useradmin/src/useradmin/conf.py:62: [C0326(bad-whitespace), ] No space allowed around keyword argument assignment
PWD_HINT = Config(
^
apps/useradmin/src/useradmin/conf.py:70: [C0326(bad-whitespace), ] No space allowed around keyword argument assignment
PWD_ERROR_MESSAGE = Config(
^
***** Module hadoop.fs.hadoopfs
desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py:550: [C0326(bad-whitespace), ] No space allowed after bracket
blocks_dict = dict( (b.blockId, b) for b in self.blocks )
^
desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py:550: [C0326(bad-whitespace), ] No space allowed before bracket
blocks_dict = dict( (b.blockId, b) for b in self.blocks )
^
desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py:558: [C0326(bad-whitespace), ] Exactly one space required after comma
block_list.sort(cmp=lambda a,b: cmp(a.startOffset, b.startOffset))
^
Your code has been rated at 9.78/10
Diff: |
Revision 3 (+20 -7) |
---|