[
https://issues.apache.org/jira/browse/SPARK-27513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
koert kuipers updated SPARK-27513:
----------------------------------
Description:
currently the tarball is created in dev/make-distribution.sh like this:
{code:bash}
tar czf "spark-$VERSION-bin-$NAME.tgz" -C "$SPARK_HOME" "$TARDIR_NAME"
{code}
the problem with this is that if root unpacks this tarball the files are owned
by whatever the uid is of the person that created the tarball. this uid
probably doesnt exist or belongs to a different unrelated user. this is
unlikely to be what anyone wants.
for other users this problem doesnt exist since tar is now allowed to change
uid. so when they unpack the tarball the files are owned by them.
it is more typical to set the uid and gid to 0 for a tarball. that way when
root unpacks it the files are owned by root. so like this:
{code:bash}
tar czf "spark-$VERSION-bin-$NAME.tgz" --numeric-owner --owner=0 --group=0 -C
"$SPARK_HOME" "$TARDIR_NAME"
{code}
was:
currently the tarball is created in dev/make-distribution.sh like this:
{code:bash}
tar czf "spark-$VERSION-bin-$NAME.tgz" -C "$SPARK_HOME" "$TARDIR_NAME"
{code}
the problem with this is that if root unpacks this tarball the files are owned
by whatever the uid is of the person that created the tarball. this uid
probably doesnt exist or belongs to a different unrelated user. this is
unlikely to be what anyone wants.
for other users this problem doesnt exist since tar is now allowed to change
uid. so when they unpack the tarball the files are owned by them.
it is more typical to set the uid and gid to 0 for a tarball. that way when
root unpacks it the files are owned by root. so like this:
{code:bash}
tar czf "spark-$VERSION-bin-$NAME.tgz" --numeric-owner --owner=0 --group=0 -C
"$SPARK_HOME" "$TARDIR_NAME
{code}
> Spark tarball with binaries should have files owned by uid 0
> ------------------------------------------------------------
>
> Key: SPARK-27513
> URL: https://issues.apache.org/jira/browse/SPARK-27513
> Project: Spark
> Issue Type: Bug
> Components: Build
> Affects Versions: 2.4.1
> Reporter: koert kuipers
> Priority: Minor
> Fix For: 3.0.0
>
>
> currently the tarball is created in dev/make-distribution.sh like this:
> {code:bash}
> tar czf "spark-$VERSION-bin-$NAME.tgz" -C "$SPARK_HOME" "$TARDIR_NAME"
> {code}
> the problem with this is that if root unpacks this tarball the files are
> owned by whatever the uid is of the person that created the tarball. this uid
> probably doesnt exist or belongs to a different unrelated user. this is
> unlikely to be what anyone wants.
> for other users this problem doesnt exist since tar is now allowed to change
> uid. so when they unpack the tarball the files are owned by them.
> it is more typical to set the uid and gid to 0 for a tarball. that way when
> root unpacks it the files are owned by root. so like this:
> {code:bash}
> tar czf "spark-$VERSION-bin-$NAME.tgz" --numeric-owner --owner=0 --group=0 -C
> "$SPARK_HOME" "$TARDIR_NAME"
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]