well, if you got a working command line why not use it? https://docs.vagrantup.com/v2/synced-folders/rsync.html
note is __ no _ between rsync__args (array of strings) - A list of arguments to supply to rsync. By default this is ["--verbose", "--archive", "--delete", "-z"]. config.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__exclude: ".git/" So start testing with this: *--rsync-path="sudo rsync"* *it should work* Alvaro. On Fri, Oct 31, 2014 at 4:30 PM, San <[email protected]> wrote: > Thanks for the heads up Alvaro! > The user that is used to do the remote login for rsync, got full sudo > access and there was a company-wide decision we took to put some stuff > under the /root location for some security reason. I can do the easily > from the command line using a command, equivalent to this: > > rsync -abvz -e "ssh -i ${SSH_KEY} ${SSH_OPTIONS}" \ > *--rsync-path="sudo rsync"* --exclude="*.git" > --exclude="*.swp" \ > --exclude="OLD_*" --exclude "ORG-*" --exclude "users" > \ > --progress "../scripts" "../certs" "../puppet" > ubuntu@${ADDR}:/root/p1from > the command line > > > So, I was hoping to do the same using Vgrant as well. Let me know if any > part of this not clear. Best! > > > > On Thursday, October 30, 2014 10:12:15 PM UTC, Alvaro Miranda Aguilera > wrote: >> >> hello, >> >> the user that does the ssh is what does the copy.. >> >> HOST -> guest user by ssh, say vagrant -> file (owner vagrant) >> >> If you can explain a bit more the requirement, I can give you some >> suggestions, >> >> If root user is 100% required, I probably will use a shell provider after >> the sync, to move and set permissions. >> a different approach will be override the ssh user/pass to use the sync >> as root.. not sure how easy this will be, without a better idea of the >> requirement. >> >> options are.. but why you need root user and /root/ ? >> >> since if they are for security, then the potential solution becomes more >> complex tricky >> >> getme the output of this command please >> >> mkdir -p /root/p1/puppet >> getfacl /root/p1/puppet >> >> if vagrant user can have access to /root/p1/puppet and your guest is >> linux, you may use acls >> >> >> >> Alvaro. >> > -- > You received this message because you are subscribed to the Google Groups > "Vagrant" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
