dustymabe / vagrant-sshfs

SSHFS synced folder implementation for Vagrant.
GNU General Public License v2.0
225 stars 33 forks source link

owner and group not working #127

Closed rednaks closed 2 years ago

rednaks commented 3 years ago

it seems that sshfs is not mounting the folders with the given owner and group. is it supported by the plugin ? if not maybe it's worth logging a warning or an error to say that they're not supported.

Thanks.

tuupola commented 3 years ago

Also currently with libvirt provider files get mounted as vagrant:vagrant but with VirtualBox provider files get mounted as 53:games. Tested with centos/7 box. The vagrant:vagrant ownership works for me, but currently with VirtualBox this is impossible because owner and group settings are not honored.

rednaks commented 3 years ago

@tuupola I submitted a patch but the project seems dead : https://github.com/dustymabe/vagrant-sshfs/pull/128

tuupola commented 3 years ago

There has been some activity this year so lets wait for a while. It is pity many Vagrant related projects often get forgotten because it is not as sexy as Docker.

dustymabe commented 2 years ago

Hey @rednaks @tuupola - regarding setting the -o uid and -o gid option for the SSHFS mount you should be able to do this via the generic sshfs_opts_append option.

I'm trying to understand the problem a bit more here though. @rednaks, you mention

not mounting the folders with the given owner and group

Where are you providing owner and group? Can you give more details?

@tuupola, I'd like to understand the issue with VirtualBox more. Unfortunately I don't currently have a VBox setup. What Host OS are you on? What does your Vagrantfile look like? What does the mount look like in the guest (ls -l on the mountpoint).

rednaks commented 2 years ago

Hi @dustymabe , the owner and group options are provided to sync_folders described here: https://www.vagrantup.com/docs/synced-folders/basic_usage#options

config.vm.synced_folder "/home/xxxx/my_local_folder", "/home/ubuntu/my_remote_folder", owner: "ubuntu", group: "ubuntu", type: "sshfs"
dustymabe commented 2 years ago

Thanks @rednaks - I was unaware of that. I'll dig in further.

Thank you for the pointer.

tuupola commented 2 years ago

I had missed all this discussion. In any case thanks for the new release!