bash—将文件从存储库移动到另一个存储库时,权限被拒绝

8ulbf1ek  于 2021-05-29  发布在  Hadoop
关注(0)|答案(1)|浏览(341)

假设我想从 /home/user/hdfs/data/adhoc/PR/02/RDO0/OUTPUT/ 所以:

hadoop fs mkdir -m 777 /hdfs/data/adhoc/PR/02/RDO0/OUTPUT/

hadoop fs -moveFromLocal RDO07J420.csv $OUTPUT_FILE_OCRE/MGM7J420-${OPC_DISO8601}.csv

但是,我有个问题:
movefromlocal:权限被拒绝:user=fs191,access=write,inode=“/hdfs/data/adhoc/pr/02/rdo0/output/mgm7j420-.csv.copying”:rdo0-mdopr:bfrdo0:drwxr-x---

xzabzqsa

xzabzqsa1#

您的本地用户在hdfs中没有写权限。尝试

sudo -u hdfs hadoop fs -moveFromLocal RDO07J420.csv $OUTPUT_FILE_OCRE/MGM7J420-${OPC_DISO8601}.csv

hdfs是根用户,具有写权限,但我建议更好地管理用户和权限
http://www.informit.com/articles/article.aspx?p=2755708&seqnum=3

相关问题