my Host OS is currently Windows 11, has anyone successfully emulated the linux permissions on their shared folders?
I wanted to emulate the 600 or 660 permissions on some files, but I can't seem to successfully make it happen.
tinkering on Windows side, doesn't do anything unless you make the files "Read-Only", but that doesn't make it 600 or 660 permission at all, it was like 500 or something.
How to emulate 600 or 660 permissions on your shared folders
Re: How to emulate 600 or 660 permissions on your shared folders
In your Linux guest, do not automount the shared folder. Instead, mount it manually with the correct options.
Here's an example using many of the options. It will mount the "folder_name" shared folder at "/mnt/shared" read-only, with the specified owner and permissions.
Just use whichever options you need and set them appropriately.
You can do the same thing in fstab:
Note: This assumes the vboxsf kernel module is loading before fstab runs. If not, you'll need to find out how to do that on your distro.
Here's an example using many of the options. It will mount the "folder_name" shared folder at "/mnt/shared" read-only, with the specified owner and permissions.
Code: Select all
mount -t vboxsf -o ro,uid=1000,gid=1000,dmode=770,fmode=660,dmask=007,fmask=117 folder_name /mnt/sharedYou can do the same thing in fstab:
Code: Select all
folder_name /mnt/shared vboxsf ro,uid=1000,gid=1000,dmode=770,fmode=660,dmask=007,fmask=117 0 0Re: How to emulate 600 or 660 permissions on your shared folders
My guest distro is Ubuntu 24.04 LTS.
Is this possible to do on just a certain file?
Is this possible to do on just a certain file?
Re: How to emulate 600 or 660 permissions on your shared folders
You can't do that with a single file. But if you can place that file in its own subfolder (perhaps alongside any other files you want to have the same permissions), then you can bind mount that folder to another location and specify what permissions it should have at that alternate location (see the bindfs command documentation).
Alternatively, you can create multiple VirtualBox shared folders with different permissions. They can even point to the same folder on the host.
If I knew more about exactly what you want to accomplish I might be able to give more specific advice.
Alternatively, you can create multiple VirtualBox shared folders with different permissions. They can even point to the same folder on the host.
If I knew more about exactly what you want to accomplish I might be able to give more specific advice.
-
johnwood
- Posts: 3
- Joined: 27. May 2023, 06:39
- Primary OS: MS Windows 10
- VBox Version: OSE Debian
- Guest OSses: Windows
Re: How to emulate 600 or 660 permissions on your shared folders
you're hitting a fundamental limitation when trying to directly map Linux permissions like 600 or 660 from a Windows host. Windows NTFS filesystem simply doesn't support Unix-style permissions (owner, group, others) in the same way. The solution lies in configuring the mount options within your Linux guest. When you mount your shared folder, you need to specify 'umask' (or 'dmask' and 'fmask' for more fine-grained control) to simulate the desired permissions. For example, to achieve '600' for files and '700' for directories (a common setup for user-private files), you would typically use 'umask=0077' during the mount operation. This means others have no permissions, and group has no permissions, leaving only owner read/write/execute for directories and read/write for files (if not explicitly restricted by fmask).skeith22 wrote: ↑10. Apr 2026, 10:18 my Host OS is currently Windows 11, has anyone successfully emulated the linux permissions on their shared folders?
I wanted to emulate the 600 or 660 permissions on some files, but I can't seem to successfully make it happen.
tinkering on Windows side, doesn't do anything unless you make the files "Read-Only", but that doesn't make it 600 or 660 permission at all, it was like 500 or something.connections unlimited