On 06/08/2018 10:57 PM, Robert McBroom wrote:
On 06/08/2018 02:02 PM, Rick Stevens wrote:
On 06/08/2018 10:52 AM, Robert McBroom via users wrote:
I keep a repo of the packages for Fedora on a NAS system on a linksys
router.  The file system is ntfs.  rsync has stopped being able to
synchronize the package files from the updates in cache/dnf.  Piping the
updates through cpio works but complains about not being able to set the
permissions on the transferred files to the same as the source.  ntfs
has permissions of 775 and those for the package files in updates are
644.  Is there a way to get rsync ntfs aware?
rsync doesn't care what the source or target filesystem are. If rsync
is running as a non-root user and that user isn't the owner or group of
the target filesystem's directories, then yeah, it's not going to be
able to change the permissions (the rsync user has to have write
permission on the target).


System is mounted with CIFS with write permission.  NAS only uses version 1.0.

Sample effects
rsync . -av /mnt/external/f27/Packages

sending incremental file list
rsync: failed to set permissions on "/mnt/external/f27/Packages/.": Permission denied (13)
./
ffmpeg-libs-3.3.6-1.fc27.x86_64.rpm
gstreamer1-plugins-ugly-1.12.4-3.fc27.x86_64.rpm
k3b-extras-freeworld-17.08.3-1.fc27.x86_64.rpm
vlc-3.0.0-0.48.git20180109.rc5.fc27.x86_64.rpm
vlc-core-3.0.0-0.48.git20180109.rc5.fc27.x86_64.rpm
rsync: mkstemp "/mnt/external/f27/Packages/.ffmpeg-libs-3.3.6-1.fc27.x86_64.rpm.eZUrRd" failed: Permission denied (13)
rsync: mkstemp "/mnt/external/f27/Packages/.gstreamer1-plugins-ugly-1.12.4-3.fc27.x86_64.rpm.kK2GDX" failed: Permission denied (13)
rsync: mkstemp "/mnt/external/f27/Packages/.k3b-extras-freeworld-17.08.3-1.fc27.x86_64.rpm.HlwOHH" failed: Permission denied (13)
rsync: mkstemp "/mnt/external/f27/Packages/.vlc-3.0.0-0.48.git20180109.rc5.fc27.x86_64.rpm.XtxTXr" failed: Permission denied (13)
rsync: mkstemp "/mnt/external/f27/Packages/.vlc-core-3.0.0-0.48.git20180109.rc5.fc27.x86_64.rpm.zXJevc" failed: Permission denied (13)

sent 19,244,411 bytes  received 875 bytes  38,490,572.00 bytes/sec
total size is 19,239,172  speedup is 1.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]

Message says the file bytes were sent but nothing is written to the NAS.

Using cpio command, files are transfered with a message about the mode change failure.

find . -print |cpio -p -d -m /mnt/external/f27/Packages

cpio: /mnt/external/f27/Packages/./ffmpeg-libs-3.3.6-1.fc27.x86_64.rpm: Cannot change mode to rw-r--r--: Permission denied
cpio: /mnt/external/f27/Packages/./gstreamer1-plugins-ugly-1.12.4-3.fc27.x86_64.rpm: Cannot change mode to rw-r--r--: Permission denied
cpio: /mnt/external/f27/Packages/./vlc-core-3.0.0-0.48.git20180109.rc5.fc27.x86_64.rpm: Cannot change mode to rw-r--r--: Permission denied
cpio: /mnt/external/f27/Packages/./vlc-3.0.0-0.48.git20180109.rc5.fc27.x86_64.rpm: Cannot change mode to rw-r--r--: Permission denied
cpio: /mnt/external/f27/Packages/./k3b-extras-freeworld-17.08.3-1.fc27.x86_64.rpm: Cannot change mode to rw-r--r--: Permission denied
37577 blocks


Directory entries on the source are of the form
  -rw-r--r--. 1 root root   212504 Jun  5 15:37 autocorr-en-5.4.7.2-2.fc27.noarch.rpm
  -rw-r--r--. 1 root root   138408 Jun  8 09:03 cryptsetup-1.7.5-4.fc27.x86_64.rpm
  -rw-r--r--. 1 root root   233448 Jun  8 09:03 cryptsetup-libs-1.7.5-4.fc27.x86_64.rpm

all entries on the NAS have the mode set as

  -rwxrwxr-x. 1 root root   212504 Jun  5 15:37 autocorr-en-5.4.7.2-2.fc27.noarch.rpm
  -rwxrwxr-x. 1 root root   138408 Jun  8 09:03 cryptsetup-1.7.5-4.fc27.x86_64.rpm
  -rwxrwxr-x. 1 root root   233448 Jun  8 09:03 cryptsetup-libs-1.7.5-4.fc27.x86_64.rpm

mounting a ntfs files system has entries with the mode set of the form

  -rwxrwxrwx.  1 root root        150 Dec  1  2012 case8.bat
  -rwxrwxrwx.  1 root root        259 Oct 31  2012 chain1
  -rwxrwxrwx.  1 root root      65379 Feb 18  2007 chnllineup.pdf

The chmod command has no effect on the permission settings of the ntfs files.




  -