You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

rsync cannot create directory

I am having a very strange problem with my rsync server setup. When running the rsync daemon from the command line, it works as excepted. I can transfer files without problems. However, when invoking the daemon from launch (launchctl load /Library/LaunchDaemons/org.samba.rsync.plist), no directories can be created. Evidently is a permissions problem which I cannot find where and how.


From the command line (as root) [no problems]:

/usr/local/bin/rsync --daemon --no-detach --config=/usr/local/etc/rsyncd.conf


When using launch, the following error is generated

2020/09/16 10:34:14 [54618] recv_file_list done
2020/09/16 10:34:14 [54618] generator starting pid=54618
2020/09/16 10:34:14 [54618] delta-transmission enabled
2020/09/16 10:34:14 [54618] recv_generator(Library,0)
2020/09/16 10:34:14 [54618] rsync: [generator] recv_generator: mkdir "Library" (in Backup) failed: Operation not permitted (1)
2020/09/16 10:34:14 [54618] *** Skipping any contents from this failed directory ***


My /Library/LaunchDaemons/org.samba.rsync.plist looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Disabled</key>
    <false/>

    <key>Label</key>
    <string>org.samba.rsync</string>

    <key>Program</key>
    <string>/usr/local/bin/rsync</string>

    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/bin/rsync</string>
        <string>--daemon</string>
        <string>--no-detach</string>
        <string>--verbose</string>
        <string>--config=/usr/local/etc/rsyncd.conf</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <dict>
        <key>SuccessfulExit</key>
        <false/>
    </dict>
</dict>
</plist>


My /usr/local/etc/rsyncd.conf:

hosts allow = 192.168.0.0/16
reverse lookup = false

list = yes

uid = nobody
gid = nobody
log file = /var/log/rsync.log

motd file = /usr/local/etc/rsyncd.motd

[Backup]
  path = /Volumes/BackupVolume/BACKUPS/
  comment = Backup area
  read only = false
  write only = false
  use chroot = false
#  max verbosity = 100
  uid = nobody
  gid = nobody

Posted on Sep 16, 2020 5:30 AM

Reply

Similar questions

3 replies

Sep 16, 2020 5:30 AM in response to afberendsen


My environment is:

HG000004:~ root# sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15.6
BuildVersion:   19G2021

HG000004:~ root# system_profiler SPHardwareDataType
Hardware:

    Hardware Overview:

      Model Name: Mac mini
      Model Identifier: Macmini7,1
      Processor Name: Dual-Core Intel Core i5
      Processor Speed: 1,4 GHz
      Number of Processors: 1
      Total Number of Cores: 2
      L2 Cache (per Core): 256 KB
      L3 Cache: 3 MB
      Hyper-Threading Technology: Enabled
      Memory: 4 GB
      Boot ROM Version: 249.0.0.0.0
      SMC Version (system): 2.24f32
      Serial Number (system): ********
      Hardware UUID: *********


Sep 16, 2020 7:04 AM in response to afberendsen

Catalina restricts who can write to where, and it seems to affect launchd items separately.

While you can run it from the terminal as root, when it is run by launchd it has different restrictions even though it is also running as root.


I think you need to find a way to give it Full Disk Access, but I'm not sure how to do that. You might be able to search around and find something related that has solved the problem.

rsync cannot create directory

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