2

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?

Eliah Kagan
  • 117,780
  • I don't see a problem with permissions? Just put unifi-video in the group vboxsf if you need write access to "/home/$USER/cam". also: "how do I change one directory (/home/tiqvah/cam) to meet both requirements simultaneously?" how does that affect "/usr/lib/unifi-video/data/videos"?! There is no relation between the 2 permissions wise that is. – Rinzwind Aug 28 '19 at 19:50
  • @Rinzwind I have tried putting unifi-video in group vboxsf. 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. Adding unifi-video to vboxsf does not work. If you give bash commands as a suggested answer below, I can tell you whether or not the approach worked. – Walrus the Cat Aug 28 '19 at 20:19
  • https://askubuntu.com/questions/69221/adding-user-to-a-group-why-had-to-reboot – mook765 Aug 29 '19 at 00:23
  • @mook765 didn't work ... thx tho – Walrus the Cat Aug 30 '19 at 20:51
  • @WalrustheCat There is an answer about passing uid,gid options to mount, have you tried that? – Lapshin Dmitry Sep 11 '19 at 08:55

0 Answers0