rsync fails with 'Permission denied (13)' after months of working flawlessly

Hi,


I do hope someone is able to help ;-)


After months of successfully usingthe following command


rsync -rav /volumes/dt-imac27hd/users/dave/Music/iTunes /volumes/MediaBackup2T


to incrementally backup new additions to my iTunes library to an externally FW800 connected disk, it has started to fail, reporting the following:


rsync: recv_generator: mkdir "/volumes/MediaBackup2T/iTunes/iTunes Music/TV Shows/abcde" failed: Permission denied (13)

*** Skipping everything below this failed directory ***



The example quotes a TV Show but it also fails on music tracks. It seems to start to work when the command is first issued but will fail after any number of items. And one puzzling thing is that when it does work it copies items that exist on the target drive when they should be ignored.


I usually run it manually once a week or so (I must get round to using a plist someday) and it has never failed until recently.


I have Googled to my wits end without success. Most articles point towards a permissions problem on a remote server but none, so far as I can find, to an external disk but I'm not sure if this is relevant.


I have an iMac 27" i7 with 2TB disk and 12GB Ram running the lateset Maveriks (10.9.2) software.



Many thanks in advance.

iMac, OS X Mountain Lion (10.8.3)

Posted on Apr 14, 2014 8:17 AM

Reply
4 replies

Oct 11, 2017 2:48 PM in response to k3comms

Hello:

I went through the same process. After reading the rsync man-pages and tweaking my syntax it all suddenly stopped working. Cascades of errors flooded what was meant to be a lean Terminal screen. Rewriting the syntax worked towards my objective: a simple data backup from the computer's main drive to an external drive locally connected via USB_2.


1) Syntax

Back in the man-pages I found a basic sample syntax:

rsync -av


To it I added my salt&pepper :

rsync -av --perms --delete --inplace --progress --stats


Where :

  1. --perms : preserves folders and files permissions from the Source Drive onto the Destination Drive.
  2. --delete : removes from the Destination Drive any folder or file not existing on the Source Drive
  3. --inplace : writes new files directly on the Destination Drive instead of creating them at the Source Drive to move them afterwards to the Destination Drive.
  4. --progress : provides information about files and data being transfered along with the expected remaining time.
  5. --stats : once finished, rsync provides the following statistical data about the session:
  • Number of files:
  • Number of files transferred:
  • Total file size: bytes
  • Total transferred file size: bytes
  • Literal data: bytes
  • Matched data: bytes
  • File list size:
  • File list generation time: seconds
  • File list transfer time: seconds
  • Total bytes sent:
  • Total bytes received:
  • sent bytes
  • received bytes
  • bytes/sec
  • total size is
  • speedup is


2) The Path

I dragged from Finder and dropped at Terminal:

  1. First: the Source Folder
  2. Secondly: the Destination Folder
  3. I ensured there was only one blank space between the last option on the syntax and /YourPath/to/SourceFolder/
  4. I ensured there was only one blank space between the Source Folder's path and /YourPath/to/DestinationFolder
  5. I used / at the end of the Source Folder's path meaning: Copy the contents of SourceFolder onto /YourPath/to/DestinationFolder


3) Syntax & Path

rsync -av --perms --delete --inplace --progress --stats /YourPath/to/SourceFolder/ /YourPath/to/DestinationFolder

It achieved the goal.

Apr 14, 2014 10:34 AM in response to Linc Davis

Hi Linc,


Thanks for offering to help.


If I use disk utility and select the target disk the options to Verify/Repair it are greyed out.


If I cd to the disk using terminal and check one of the affected files this is what i see:"


-rw-rw-r-- 1 dave macports 358479285 13 Jun 2013 Mad.Men.S01E03.mp4


Moving up one level the parent dir shows this


drwxrwxr-x 84 dave macports 2856 24 Jun 2013 Mad Men


Hope this helps.


Cheers.

Apr 14, 2014 11:04 AM in response to k3comms

I've solved the problem and it's all my fault!


I mistyped the original command, omiting the last letter for the target disk, so rather than writing to the external disk rsync was writing to a new directory on my existing disk!


Still unsure about the error messages but at least I have fixed my problem.


Thanks again for offering to help.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

rsync fails with 'Permission denied (13)' after months of working flawlessly

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.