Github user growse commented on a diff in the pull request:
https://github.com/apache/spark/pull/4507#discussion_r24428111
--- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
@@ -285,7 +285,7 @@ private[spark] object Utils extends Logging {
} else {
// Restrict file permissions via chmod if available.
// For Windows this step is ignored.
- if (!isWindows && !chmod700(dir)) {
+ if (!isWindows && (conf==null ||
!isRunningInYarnContainer(conf)) && !chmod700(dir)) {
--- End diff --
Will do another PR.
Re: 750 - this isn't supported by the JDK, because group permissions are
Posix-specific, so you'd need logic to say:
if (linux) { setPosixGroupReadable(); }
Also, if you explicitly set the permissions, it has the effect of
overruling the setgid flag on the parent directory and you end up with the same
group as the user. On YARN, the desired permissions of the files should be:
-rw-r----- containeruser yarn
The group is set from the setgid flag on the parent directories. Any
explicit chmod from spark overrides this and you end up with a file that's
chown'd containeruser:containeruser. Only way around this would be to somehow
know the group that the YARN nodemanager process is running as, but that would
start to get messy I think.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]