首页 > 代码库 > 使用 rsync 出错:rsync: chgrp "XXXX" failed: Operation not permitted
使用 rsync 出错:rsync: chgrp "XXXX" failed: Operation not permitted
You are probably running rsync like this:
rsync -a dir/ remote:/dir/
The -a
option according to the documentation is equivalent to: -rlptgoD
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
You probably want to remove the -o
and -g
options:
-o, --owner preserve owner (super-user only) -g, --group preserve group
So instead your rsync command should look something like this:
rsync -rlptD dir/ remote:/dir/
Or as @glglgl points out:
rsync -a --no-o --no-g dir/ remote:/dir/
The remaining options in use are:
-r, --recursive recurse into directories -l, --links copy symlinks as symlinks -p, --perms preserve permissions -t, --times preserve modification times -D same as --devices --specials --devices preserve device files (super-user only) --specials preserve special files
使用 rsync 出错:rsync: chgrp "XXXX" failed: Operation not permitted
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。