码迷,mamicode.com
首页 > 其他好文 > 详细

使用 rsync 出错:rsync: chgrp "XXXX" failed: Operation not permitted

时间:2016-12-16 23:46:59      阅读:2124      评论:0      收藏:0      [点我收藏+]

标签:equivalent   command   something   running   instead   

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

标签:equivalent   command   something   running   instead   

原文地址:http://7758646.blog.51cto.com/7748646/1883273

(1)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!