title: rsync - mkstemp failed: Permission denied (13)
body: <p>I have the following setup to periodically rsync files from server A to server B. Server B has the rsync daemon running with the following configuration:</p>
  
  <pre><code>read only = false
  use chroot = false
  max connections = 4
  syslog facility = local5
  log file = /var/adm/rsyncd.log
  munge symlinks = false
  secrets file = /etc/rsyncd.secrets
  numeric ids = false
  transfer logging = true
  log format = %h %o %f %l %b
  
  
  [BACKUP]
          path = /path/to/archive
          auth users = someuser
  </code></pre>
  
  <p>From server A I am issuing the following command:</p>
  
  <pre><code>rsync -adzPvO --delete --password-file=/path/to/pwd/file/pwd.dat /dir/to/be/backedup/ someuser@192.168.100.100::BACKUP
  </code></pre>
  
  <p>BACKUP directory is fully read/write/execute to everyone. When I run the rsync command from server A, I see:</p>
  
  <pre><code>afile.txt
           989 100%    2.60kB/s    0:00:00 (xfer#78, to-check=0/79)
  </code></pre>
  
  <p>for each and everyfile in the directory I wish to backup. It fails when I get to writing tmp files:</p>
  
  <pre><code>rsync: mkstemp "/.afile.txt.PZQvTe" (in BACKUP) failed: Permission denied (13)
  </code></pre>
  
  <p>Hours of googling later and I still can't resolve what seems to be a very simple permission issue. Advice? Thanks in advance.</p>
  
  <p><strong>Additional Information</strong></p>
  
  <p>I just noticed the following occurs at the beginning of the process:</p>
  
  <pre><code>rsync: failed to set permissions on "/." (in BACKUP): Permission denied (13)
  </code></pre>
  
  <p>Is it trying to set permission on "/"?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I am logged in as the user - someuser. My destination directory has full read/write/execute permission for everyone, including it's contents. In addition, the destination directory is owned by someuser and in someuser's group.</p>
  
  <p><strong>Follow up</strong></p>
  
  <p>I've found using SSH solves this</p>