Repository: incubator-ranger
Updated Branches:
  refs/heads/master 8b092fa29 -> 7c6d268f3


RANGER-439: fix to default unix userid and group if it is not defined in 
install.property file


Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/7c6d268f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/7c6d268f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/7c6d268f

Branch: refs/heads/master
Commit: 7c6d268f32da2c00ee6a462772e49f24f13d0069
Parents: 8b092fa
Author: sneethiraj <[email protected]>
Authored: Fri May 1 02:51:30 2015 -0400
Committer: sneethiraj <[email protected]>
Committed: Fri May 1 02:51:30 2015 -0400

----------------------------------------------------------------------
 unixauthservice/scripts/setup.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/7c6d268f/unixauthservice/scripts/setup.py
----------------------------------------------------------------------
diff --git a/unixauthservice/scripts/setup.py b/unixauthservice/scripts/setup.py
index 0094e32..dbc209f 100755
--- a/unixauthservice/scripts/setup.py
+++ b/unixauthservice/scripts/setup.py
@@ -336,14 +336,14 @@ def main():
        if (unixUserProp in mergeProps):
                ownerName = mergeProps[unixUserProp]
        else:
-               print "ERROR: Property [%s] not defined." % (unixUserProp)
-               sys.exit(1)
+               mergeProps[unixUserProp] = "ranger"
+               ownerName = mergeProps[unixUserProp]
 
        if (unixGroupProp in mergeProps):
                groupName = mergeProps[unixGroupProp]
        else:
-               print "ERROR: Property [%s] not defined." % (unixGroupProp)
-               sys.exit(1)
+               mergeProps[unixGroupProp] = "ranger"
+               groupName = mergeProps[unixGroupProp]
 
        try:
                ownerId = pwd.getpwnam(ownerName).pw_uid
@@ -358,6 +358,7 @@ def main():
        os.chown(logFolderName,ownerId,groupId)
        os.chown(ugsyncLogFolderName,ownerId,groupId)
        os.chown(pidFolderName,ownerId,groupId)
+       os.chown(rangerBaseDirName,ownerId,groupId)
 
        initializeInitD()
 
@@ -375,9 +376,7 @@ def main():
                        updateProppertyInJCKSFile(cryptPath,aliasName," ")
 
 
-       fixPermList = [ "." ]
-       for d in dirList:
-               fixPermList.append(d)
+       fixPermList = [ ".", usersyncBaseDirName, confFolderName, 
certFolderName ]
 
        for dir in fixPermList:
                for root, dirs, files in os.walk(dir):

Reply via email to