- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How can I fix incorrect file permissions for set-hdfs-plugin-env.sh when restarting from ambari
Created ‎12-15-2015 04:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ambari sets up set-hdfs-plugin-env.sh with root:hadoop 700 permissions when it restarts HDFS, this causes ranger integration to break as the hdfs user cannot execute this script when the namenode starts.
I can fix the problem if I restart the namenode manually, but that means to deploy config changes I need to restart from Ambari, then correct permissions and restart manually.
How
Created ‎12-17-2015 08:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use the following work-around:
On the namenode box,
- login as root
- execute:
# cp /etc/hadoop/conf/set-hdfs-plugin-env.sh /etc/hadoop/conf/set-hdfs-plugin-env-permfix.sh # chown hdfs:hadoop /etc/hadoop/conf/set-hdfs-plugin-env-permfix.sh
- Then edit, /usr/hdp/current/hadoop-client/libexec/hadoop-config.sh file to modify the references to set-hdfs-plugin-env.sh to " set-hdfs-plugin-env-permfix.sh"
This workaround should help you to start the namenode from Ambari without having to change permission manually every time.
Created ‎12-15-2015 05:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
what hdp version is this?
Created ‎12-15-2015 07:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is HDP 2.2.6, Ambari 2.1.2.1
Created ‎12-17-2015 08:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
what is umask value for the root user ? This may have set the file to have no execute permission for the group.
Created ‎12-17-2015 09:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The root user's umask is 0027
Created ‎12-17-2015 08:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use the following work-around:
On the namenode box,
- login as root
- execute:
# cp /etc/hadoop/conf/set-hdfs-plugin-env.sh /etc/hadoop/conf/set-hdfs-plugin-env-permfix.sh # chown hdfs:hadoop /etc/hadoop/conf/set-hdfs-plugin-env-permfix.sh
- Then edit, /usr/hdp/current/hadoop-client/libexec/hadoop-config.sh file to modify the references to set-hdfs-plugin-env.sh to " set-hdfs-plugin-env-permfix.sh"
This workaround should help you to start the namenode from Ambari without having to change permission manually every time.
Created ‎12-17-2015 09:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yeah, I've thought about that, I don't like it... it's one more thing that's hacked together manually and has to be tracked and maintained. I'd much prefer a fix to Ambari's config...
