[
https://issues.apache.org/jira/browse/HDFS-16673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17636979#comment-17636979
]
ASF GitHub Bot commented on HDFS-16673:
---------------------------------------
GuoPhilipse commented on PR #4602:
URL: https://github.com/apache/hadoop/pull/4602#issuecomment-1322966990
> Did you test it? This behavior is consistent with the local file system.
Thanks for your review @tomscut , actually `chown ` command can be used for
change owner or group belong info.
i used chown to change the file group ,keeping the owner as the before.
maybe we can make it clearer ,if we use `chown` to change owner ,super user
is a must, if we use `chown` to change the group ,then user either may be the
owner of the files or the super user.
reproduce steps as the following
step1 :create new group
`groupadd philipse1`
step2:add user to the group
`useradd philipse -g philipse1`
step3: touch a file(any user)
hdfs dfs -touch /tmp/test2/test3
step4:use super user(hadoop is the super user) to change the owner and group
of the file to philipse
hdfs dfs -chown philipse:philipse /tmp/test2/test3
now we get the file info as the following:
`-rw-r--r
> Fix usage of chown
> ------------------
>
> Key: HDFS-16673
> URL: https://issues.apache.org/jira/browse/HDFS-16673
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: documentation
> Affects Versions: 3.3.3
> Reporter: guophilipse
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> actually `chown` command can be used for the owner of the files or the super
> user, we need to correct the doc
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]