I have a source folder
source/
-rw-------@ 1 user staff 41B Mar 23 13:59 aws-1
-rw-r--r-- 1 user staff 112B Mar 23 14:36 aws-2
-rw-rw-rw-@ 1 user staff 2.3K Feb 5 17:15 google
the destination folder doesn't exist yet. And I try to rsync the 2 aws files into a destination folder. Here is my command:
rsync \
-avh --chmod=a=rw \
--include="aws-*" \
--exclude="*" \
"source/" "destination/"
What I'm trying to do is to rsync the 2 aws files and change their permissions once in the destination folder. After running the command, I got an error and the files are not in the destination folder. Only the folder is created. Here is the error:
building file list ... done
created directory /Users/user/destination/aws
./
rsync: recv_generator: failed to stat "/Users/user/destination/aws/aws-1": Permission denied (13)
rsync: recv_generator: failed to stat "/Users/user/destination/aws/aws-2": Permission denied (13)
rsync: recv_generator: mkdir "/Users/user/destination/aws/." failed: Permission denied (13)
*** Skipping everything below this failed directory ***
It says permission denied without copying the files. I don't already understand which permission cause problem. My source file and directory seems fine. The created destination folder seems also fine.
PS: I precise my rsync command happens inside a bash script
/Users/user/destination/
and update your question to disclose that it is a problem with attributes. The link answers why you see the errors, but you didn't ask a real question. – ctx Mar 23 '17 at 16:43xattr -l destination
but it shows nothing. – eakl Mar 23 '17 at 19:57com.apple.TextEncoding: utf-8;134217984
andcom.apple.metadata:kMDLabel_opewstnruelznhfy6in7kkdv54
withxattr -l source/aws-1
. Removing the attributes from aws-1 doesn't solve the problem – eakl Mar 23 '17 at 20:15