Fixed the sandbox owner for command tasks.
Fixed the sandbox owner for command tasks.

If the task has a rootfs, the command executor will be run under root
because it needs to perform pivot_root. Prior to this patch, if the
task wants to run under an unprivileged user, the sandbox of that task
will not be writable because it's owned by root.

This patch fixed the issue (MESOS-6391). The command executor now
changes the owner (non-recursively) of the sandbox to match that of
the task when rootfs is specified for the task.

Review: https://reviews.apache.org/r/52854

andschwa/mesos,dforsyth/mesos,Gilbert88/mesos,neilconway/mesos,abudnik/mesos,asamerh4/mesos,reneploetz/mesos,andschwa/mesos,Gilbert88/mesos,abudnik/mesos,dforsyth/mesos,Aman-Jain-14/customizedMesos,Aman-Jain-14/customizedMesos,zmalik/mesos,verizonlabs/mesos,jpeach/mesos,verizonlabs/mesos,gsantovena/mesos,chhsia0/mesos,kaysoky/mesos,craimbert/mesos,kaysoky/mesos,gsantovena/mesos,verizonlabs/mesos,craimbert/mesos,chhsia0/mesos,Aman-Jain-14/customizedMesos,zmalik/mesos,chhsia0/mesos,andschwa/mesos,gsantovena/mesos,dforsyth/mesos,yuquanshan/customizedMesos,Aman-Jain-14/customizedMesos,yuquanshan/customizedMesos,chhsia0/mesos,abudnik/mesos,dforsyth/mesos,jpeach/mesos,reneploetz/mesos,craimbert/mesos,craimbert/mesos,chhsia0/mesos,neilconway/mesos,jpeach/mesos,abudnik/mesos,Gilbert88/mesos,neilconway/mesos,neilconway/mesos,chhsia0/mesos,Gilbert88/mesos,kaysoky/mesos,neilconway/mesos,Aman-Jain-14/customizedMesos,dforsyth/mesos,abudnik/mesos,gsantovena/mesos,zmalik/mesos,neilconway/mesos,andschwa/mesos,chhsia0/mesos,craimbert/mesos,yuquanshan/customizedMesos,Gilbert88/mesos,zmalik/mesos,verizonlabs/mesos,zmalik/mesos,craimbert/mesos,reneploetz/mesos,asamerh4/mesos,kaysoky/mesos,verizonlabs/mesos,zmalik/mesos,asamerh4/mesos,kaysoky/mesos,zmalik/mesos,asamerh4/mesos,gsantovena/mesos,reneploetz/mesos,asamerh4/mesos,yuquanshan/customizedMesos,craimbert/mesos,andschwa/mesos,yuquanshan/customizedMesos,asamerh4/mesos,Gilbert88/mesos,Aman-Jain-14/customizedMesos,yuquanshan/customizedMesos,kaysoky/mesos,andschwa/mesos,jpeach/mesos,Aman-Jain-14/customizedMesos,verizonlabs/mesos,yuquanshan/customizedMesos,reneploetz/mesos,reneploetz/mesos,jpeach/mesos,Gilbert88/mesos,jpeach/mesos,verizonlabs/mesos,abudnik/mesos,dforsyth/mesos,abudnik/mesos,neilconway/mesos,gsantovena/mesos,andschwa/mesos,gsantovena/mesos,dforsyth/mesos,jpeach/mesos,kaysoky/mesos,asamerh4/mesos,reneploetz/mesos