rsync permissions

40 views
Skip to first unread message

Jamie Jackson

unread,
Oct 6, 2015, 5:16:24 PM10/6/15
to vagra...@googlegroups.com
Hi Folks,

Since I can't get nfs to work on one of two Mac OS X El Capitan hosts( https://github.com/mitchellh/vagrant/issues/6360 ) , I've been trying shared folders with rsync today.

However, I can't seem to do anything with the permissions in the destination directory of the guest with rsync. (Well I can change ownership from vagrant to root by doing "rsync__chown: false", but I can't do anything else.)

I'd like to just change everything to 777 in the host and call it a day, but I haven't been able to. Here's one of many attempts: https://gist.github.com/jamiejackson/aec579378916d6da683d

Please point me in the right direction.

Thanks,
Jamie


Alvaro Miranda Aguilera

unread,
Oct 8, 2015, 6:07:14 AM10/8/15
to vagra...@googlegroups.com
hello

have you seen the end of this page?

If required to copy to a destination where vagrant user doesn't have
permissions, use "--rsync-path='sudo rsync'" to run rsync with sudo on
the guest


Can you try with that?

rsync otherwise will run as vagrant, and that permission issue looks
as non-root user problem.

if that doesnt work. rsync will be run before the provision scripts,
so you could use a shell script to fix permissions. but i think the
sudo rsync should do the trick

alvaro
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> 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 vagrant-up+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/CA%2BonWPdQDdMCB%3DHMSmaAECvNFibYoGyvofYXM%3Dq4HzRegH3%2B0w%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

Jamie Jackson

unread,
Oct 8, 2015, 12:51:51 PM10/8/15
to vagra...@googlegroups.com
Thanks, Alvaro. I'm still having problems, though:


That just results in:

$ vagrant ssh -- ls -al /var/www/vmhost/apps/hudexchange/cfml/deployment_root/wwwroot
total 280
drwxr-xr-x 23 vagrant vagrant  4096 Oct  7 16:49 .
drwxr-xr-x 15 vagrant vagrant  4096 Oct  6 17:58 ..
-rwxr-xr-x  1 vagrant vagrant 11455 Aug  6 03:42 404.htm

Does anyone spot a problem with my Vagrantfile?

I also upgraded to rsync 3.1.1 on the guest, just in case, but no difference in the end result.

One more thing: The docs are confusing, because the rsync__rsync_path option is mentioned, but the example goes on to use a "--rsync-path='sudo rsync'" rsync__args member. I'm not sure which way to go.

Thanks,
Jamie

Reply all
Reply to author
Forward
0 new messages