This is an AD account with the same permissions as the original user I was working with. I ran the backup script under a test user 'tdesigner'.
Run the same commands when you can interactively run the script and it succeeds. Then look at the /tmp/ myscript.id.txt file to see what the script thinks its user id is and look at the ls output to see what the script thinks the destination folder's look like. Run your script in the mode where it fails. They do not have to align.Īdd something like the following to your script (after you have mounted the username volume)
#Rsync mkstemp permission denied quickbuild windows
There is the username space on the Mac, and then there is the username space on the Windows server. Who is running the script? That script user may not have permissions, where as the interactive user does.Īlso note, that there are 2 user name spaces. #define EACCES 13 /* Permission denied */ Rsync issuing "permission denied (13)", which is standard Unix error retuned from an operating system call when you do not have access rights to the object you are trying to access: it's just when I try to run rsync that it has issues.
#Rsync mkstemp permission denied quickbuild mac
It doesn't seem to be a permissions error - the user has R/W permission for the share folders on the Mac side, and everything except for 'Full Control' on the Windows side.Īlso, when I log into the Mac as the user I don't have any issues manually connecting to the network share and copying files from the Mac into the share. None of the files are able to sync, only empty folders. When I run the script I get a bunch of "permission denied (13)" error messages. Rsync -aE -delete /Users/username/Documents/ /Volumes/username/backups-documents Rsync -aE -delete /Users/username/Desktop/ /Volumes/username/backups-desktop Here are the pertinent parts of the script: Sync stuff from the user's desktop and documents folder into 2 folders on the share - 'backups-desktop' and 'backups-documents' Connect to the user's private folder (located in our network on a Windows Server 2012 share)Ģ. I'm trying to write a backup script for a few Macs in our environment. This seems like an easy question, but I must be missing something obvious. These will let you specify configuration changes which are then pushed out to the remote system.First post - sorry if I'm putting this in the wrong community. If you're pushing out configuration changes including accounts, you'll have a better time of it if you use a configuration management system like puppet or cfengine. If you really do need to be able to overwrite, for example, /etc/passwd via this mechanism, then you should consider a different approach.
If that's the case, and you actually just need to be able to put them in some number of arbitrary places, then POSIX ACLs may help you out.
However I strongly suspect that you don't, in fact, require the ability to put files anywhere at all on the system. If your requirement to allow the user to write to any file at all is accurate, then there may be bigger security concerns, and it may be more prudent to do as others suggest and just allow root logins - keeping the setup simple will save you time in future. I wrote up a quick summary of inherited ACLs here. Another way of allowing arbitrary file access would be to grant your rsync user the appropriate permissions via POSIX ACLs on your filesystem(s).