Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

chmod silently fails inside VM #138

Open
XedinUnknown opened this issue Jun 26, 2016 · 4 comments
Open

chmod silently fails inside VM #138

XedinUnknown opened this issue Jun 26, 2016 · 4 comments

Comments

@XedinUnknown
Copy link

Hi,

I have a project for which there is an installation script install.sh - runs composer, WP CLI and some other commands, to simplify and document installation instructions. Of course, that file needs to be executable. When cloned, ls displays permissions for install.sh as -rw-rw-rw-, which is fine. However, same permissions are displayed after running chmod u+x install.sh or chmod u=rwx. No error message is displayed.

I tried r8 because there is a similar issue with scotchbox. However, it appears that I can't use r8 for the same reasons. On the other hand, this suggests that the issue is not with r8 or scotchbox, but with underlying infrastructure. Still, it's probably up to you guys to make it work.

@XedinUnknown
Copy link
Author

Ok, apparently it's impossible by design to change permissions on shared (i.e. mounted) folders. So, how can I execute a script in the shared directory without making all mounted files executable? Is this possible at all?

@r8
Copy link
Owner

r8 commented Jun 26, 2016

Yes, as far as I know, that's a limitation of Virtualbox. Because of the way it works with shared folders.

But you can invoke your script passing its name to shell executable. So you could run your script not using simple ./install.sh, but using bash install.sh command

@dubaaron
Copy link

dubaaron commented Aug 15, 2016

Is this a limitation of Virtualbox, no matter what synced folder provider it's using (e.g., SMB, NFS, Rsync, etc)? Or only with the default "VirtualBox" provider? @r8

PS, thanks for the reminder about that handy workaround.

@r8
Copy link
Owner

r8 commented Aug 15, 2016

That's 100% limitation of Virtualbox shared folders.

I think Rsync should work fine (but I can't tell for sure without trying)

It might work with NFS, but NFS has own caveats (for example root squashing)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants