1

I've got an aging mac os X 10.7.5 server running Apple's smb. I'd like to mount a file share from it onto a new file server (ubuntu 16.04.2), and rsync everything from old mac share to the new server. I can successfully mount the share using this mount command:

sudo mount -t cifs  //ServerIP/Groups /mnt/Server_backup -o "ro,credentials=/root/.secret_smbpw"

and can browse the share and its directories.

However, running:

sudo rsync -a /mnt/Server_backup /New_Groups_Share 

fails with Permission denied (13)

I have tried adding the ubuntu user to the Group that owns the file shares on the mac, but still get the problem.

When I run the mount command on the ubuntu machine (after the share has been mounted), I can see the mount options that are in place:

/mnt/Server_backup type cifs  (ro,relatime,vers=1.0,cache=strict,username=Ubuntu_User,domain=Mac_host_name,uid=0,noforceuid,gid=0,noforcegid,addr=ServerIP,file_mode=0755,dir_mode=0755,nounix,mapposix,rsize=61440,wsize=65536,actimeo=1)

My ultimate goal is to get rsync running nightly to sync the shares on the old file server with the new server until I can arrange a date for the office to cutover to the new server.

Thanks in advance,

Marc

Castaglia
  • 3,239
  • 3
  • 19
  • 40
Marc
  • 11
  • 2

2 Answers2

2

Obviously, the rsync process must have POSIX read/write permissions on the filesystem sync'ing to. Check for the obvious first: what user does rsync run as, and does that user have read/write permissions?

Parent directory

Since rsync is creating temporary files (unless you use --inplace), the process must also have write permissions in the parent directory. In the above example, rsync should have write permissions to /my/path/.

Net Runner
  • 5,626
  • 11
  • 29
  • 1
    Thanks for reply. I'm running rsync as root (or sudo), and it has full permissions on the destination directory. As indicated in comment to previous post, rsync as root was successful when the source directory was read only. I suspect the problem has to do with rights that are limited by perms coming from the smb share on the mac. – Marc Feb 13 '17 at 22:35
1

It looks like in your mount command you're mounting the share as read-only. Trying mounting as rw

Clay
  • 11
  • 1
  • 1
    Thanks, but I don't think that's it. I just tried a test case by creating a source dir that had read only perms. When run as root (or sudo), rsync ran without a problem. – Marc Feb 13 '17 at 22:29