I have a VirtualBox VM running Ubuntu 16.04 LTS. VirtualBox is able to share a folder with my host. It configures its permissions as follows:
$ stat /home/tiqvah/cam
File: /home/tiqvah/cam
Size: 136 Blocks: 0 IO Block: 16384 directory
Device: 30h/48d Inode: 1 Links: 1
Access: (0770/drwxrwx---) Uid: ( 0/ root) Gid: ( 999/ vboxsf)
Access: 2019-08-27 14:46:35.000000000 -0700
Modify: 2019-08-26 17:54:56.000000000 -0700
Change: 2019-08-26 17:54:56.000000000 -0700
I have an application / server running that requires a certain set of permissions in its own directories:
$ stat /usr/lib/unifi-video/data/videos
File: /usr/lib/unifi-video/data/videos
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 801h/2049d Inode: 132161 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 123/unifi-video) Gid: ( 128/unifi-video)
Access: 2019-08-27 14:45:31.104495213 -0700
Modify: 2019-08-26 18:06:16.985430445 -0700
Change: 2019-08-26 18:06:16.985430445 -0700
Assuming each application needs the aforementioned set of permissions to properly function in each directory, how do I change one directory (/home/tiqvah/cam
) to meet both requirements simultaneously? Is this something that can be done with setfacl
and if so, how?
unifi-video
in groupvboxsf
. The permissions/ownership of unifi's folder are the permissions required by unifi to use it. the permissions/ownership of~/cam
are the permissions required by virtualbox folder sharing. I need both sets of permissions / ownership required by both to be fulfilled simultaneously. Addingunifi-video
to vboxsf does not work. If you givebash
commands as a suggested answer below, I can tell you whether or not the approach worked. – Walrus the Cat Aug 28 '19 at 20:19uid
,gid
options to mount, have you tried that? – Lapshin Dmitry Sep 11 '19 at 08:55