rclone icon indicating copy to clipboard operation
rclone copied to clipboard

copy local files with --links ,directories and links are created with wrong metadata(mod uid gid)

Open hooklee2000 opened this issue 1 year ago • 0 comments

The associated forum post URL from https://forum.rclone.org

What is the problem you are having with rclone?

copy local files in ext4 filesystem in my local harddisk, I need also copy the metadata(mod uid gid mtime).

  • without --links, rclone works well.
  • But with --links ,directories and links are created with wrong metadata(mod uid gid), only mtime are good.

What is your rclone version (output from rclone version)

v1.66.0 works well,--links wrongly
v1.67.0-beta.7900.64734dfe4 works well,--links wrongly

Which OS you are using and how many bits (e.g. Windows 7, 64 bit)

CentOS7.9 ext4 filesystem in local harddisk

Which cloud storage system are you using? (e.g. Google Drive)

None

The command you were trying to run (e.g. rclone copy /tmp remote:tmp)

run as user named by user1.

mkdir -p test/src
mkdir -p test/dst

 cd test/src
 echo hello > a
 sudo chown 100:100 a

 mkdir testdir

 sudo chown 27:23 testdir/
ln -snf testdir link
ls -al src
-rw-r--r-- 1   100 users    6 Apr 19 20:09 a
lrwxrwxrwx 1 user1  user1     7 Apr 19 20:26 link -> testdir
drwxr-xr-x 2 mysql    23 4096 Apr 19 20:25 testdir

#check mod uid gid mtime:
# v1.66.0 works well,--links wrongly
# v1.67.0-beta.7900.64734dfe4 works well,--links wrongly
sudo rm -rf dst/
sudo  rclone copy --inplace --metadata  --create-empty-src-dirs  --transfers 500 --progress --fast-list --checkers 16 src dst/src
 ll dst/src

-rw-r--r-- 1   100 users    6 Apr 19 20:09 a
drwxr-xr-x 2 mysql    23 4096 Apr 19 20:25 testdir

with --links

sudo rm -rf dst/
sudo  rclone copy --inplace --metadata  --links --create-empty-src-dirs  --transfers 500 --progress --fast-list --checkers 16 src dst/src
 ll dst/src
-rw-r--r-- 1  100 users    6 Apr 19 20:09 a
lrwxrwxrwx 1 root root     7 Apr 19 20:26 link -> testdir # wrong(mod,uid,gid)
drwxrwxrwx 2 user1 user1  4096 Apr 19 20:25 testdir  # wrong(mod,uid,gid)

A log from the command with the -vv flag (e.g. output from rclone -vv copy /tmp remote:tmp)

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

hooklee2000 avatar Apr 19 '24 15:04 hooklee2000