[ 
https://issues.apache.org/jira/browse/BIGTOP-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13856715#comment-13856715
 ] 

Evans Ye commented on BIGTOP-1167:
----------------------------------

hi Jay
Since the namenode was started by hdfs user, the superuser privilige went to 
hdfs. [permissions 
guide|https://hadoop.apache.org/docs/stable1/hdfs_permissions_guide.html#The+Super-User]
You can see that the SVC_USER has been set to "hdfs" in the namenode daemon 
script(/etc/init.d/hadoop-hdfs-namenode) which is used to determine who is 
going to run the namenode.
{code}
SVC_USER="hdfs"
...
su -s /bin/bash $SVC_USER -c "cd $WORKING_DIR && $EXEC_PATH --config 
'$CONF_DIR' start $DAEMON_FLAGS"
{code}

> got "Permission denied" when creating vagrant home folder in provision.sh
> -------------------------------------------------------------------------
>
>                 Key: BIGTOP-1167
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-1167
>             Project: Bigtop
>          Issue Type: Bug
>          Components: Deployment, VM
>            Reporter: Evans Ye
>            Assignee: Roman Shaposhnik
>            Priority: Minor
>             Fix For: 0.8.0
>
>         Attachments: BIGTOP-1167.1.patch, BIGTOP-1167.2.patch
>
>
> By default, vagrant shell provisioner run shell scripts with superuser 
> privileges. Since provision.sh do hdfs write operations by root, it get 
> permission denied.
> There're two ways we can fix it.
> 1). Create vagrant's home folder by hdfs.
> 2). Let vagrant shell provisioner run the shell script without superuser 
> privileges. (set privileged to false in Vagrantfile)
> It seems solution 2 is much more elegant.
> Unfortunately, the privileged setting is only available with vagrant 1.3.0+, 
> and there's another issue coming up with 1.3.5+ which [failed the network 
> setting in fedora|https://github.com/mitchellh/vagrant/issues/2430]. So, I 
> might suggest to take solution 1 first.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to