I manage a handful of small websites and have recently switched from Windows to Mint. I was using PortableApps to keep the sites separated, and for the moment want to do the same. I’ve set up VirtualBox with a cut down Windows 10 installation, and added the root folder of the websites as a shared folder, so Websites/Site1, Websites/Site2 etc. The root folder is still on an NTFS drive.

So far, everything works, except I can’t run the PortableApps suite from the shared folder in VirtualBox. PortableApps runs and updates, but the apps don’t work properly. Thunderbird is ok but has random glitches, Firefox launches but sites don’t load, and Chrome instantly closes. If I copy the folder for the individual site into the virtual machine though, it works perfectly.

I’m assuming that it’s a permissions problem, as the NTFS drive is owned by me but is in the root group, but copying the files to the virtual machine copies them to the vboxuser group, which I’m a member of. The fstab entry for the drive is:

UUID=BAB4BFE2B4BF9EF7 /mnt/Storage ntfs defaults,uid=tippon 0 2

but from what I can gather, it should have my UID and GID instead. The examples and questions I’ve found online have some extra details at the end with no explanation though, like dmask=022, fmask=133, and I don’t want to risk editing my fstab without understanding them.

So, to finally get to the question, if I replace uid=tippon with uid=1000,gid=1000 (my user and group), would that let me access the files from within VirtualBox, as well as whichever other programs I might want to use, and would it break anything?

  • GaumBeist@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    11 minutes ago

    Since you can run the apps (glitchy as they may be), nothing is wrong with the read perms on the drive. Maybe write perms or exec perms? But ntfs perms don’t map neatly onto POSIX perms, so it’s hard to say. Maybe try setting the gid to the vboxuser group id and see if that helps?

    You might also check out the mount manpage and look at the section about “Generic Mount Options”; this is the more in-depth explanation of the “options” column in fstab, and the defaults option (which depends on the distro) can hide stuff like nouser, which prevents users from mounting the drive.

    Finally, look into ACLs and how to manage those for interoperability across Windows and POSIX systems.

    Best case scenario, fixing it so your user has all access to the drive with the user,exec options fixes your issues. Otherwise, you’ve just gotta do the learning about ACLs and POSIX perms

  • non_burglar@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    57 minutes ago

    “tippon” is just a local POSIX mapping to whatever uid assigned that user, typically the first user beyond system users in Linux or Unix is 1000. So using “tippon” instead of uid=1000 won’t make a difference.

  • just_another_person@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    5 hours ago

    Unless there is a mapping between a UID of a user across many different machines (something like a domain controller), you’re not going to be able to set proper permissions by user. You need to use a generic group, or provide global read access at a minimum.

    I’m not 100% sure why you’ve chosen this route, but there are MUCH simpler ways of doing this that don’t involve VMs and NTFS volumes.

    At this point, you’re butting up against 3 levels of nested permissions, including the VM. My suggestion would be to make sure all the files on the NTFS volume have global read access, then go into the VM and attempt to set NTFS permissions on the files (they are different). If that becomes too tedious, you could just try setting 777 on all shared files. It’s unsafe, but may get you through until you find a more…workable solution for what you’re doing here.

    I think the overall solution is to just not need this Windows VM, so look at moving these sites off to Nginx or something ASAP.

    • Tippon@lemmy.dbzer0.comOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 hours ago

      Thanks for replying :)

      I think there’s some confusion though, none of the sites are hosted locally, PortableApps just lets me use a separate browser and email client for each website, effectively sandboxed from each other so that there’s no chance of accidentally editing the wrong site or posting from the wrong account. Each PortableApps instance has its own set of logins and bookmarks etc. to manage one website and the associated emails.

      I essentially just want to run a program in a Windows 10 VM that’s stored on the Linux host but on an NTFS drive. As far as I can tell, the permissions on the NTFS drive are interfering with that, as the files are in the root group on Mint, whereas I’m in the tippon and vboxuser groups. I’m not sure how to change that without risking breaking something, but the way the NTFS drive is mounted through fstab seems to be the answer.

      I think that changing fstab so that the drive is mounted under my user and group will fix it, but I don’t know how that will affect anything else on the drive, or any Linux programs that access those files. I’m stuck with NTFS for now as I occasionally need to dual boot, and need these programs available while I’m in Windows too.

      Ideally I’m going to move away from using PortableApps to manage the sites, but I haven’t found a better way yet.

      • Björn@swg-empire.de
        link
        fedilink
        arrow-up
        4
        ·
        4 hours ago

        Firefox recently added a new profile manager to do just that. Thunderbird should also support having multiple separate profiles.

        • Tippon@lemmy.dbzer0.comOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          2 hours ago

          That’s interesting. I knew that Firefox had options for different profiles, but last time I tried I couldn’t get it working the way I wanted. I’ll have another look, thanks :)

        • MagnificentSteiner@lemmy.zip
          link
          fedilink
          English
          arrow-up
          3
          ·
          3 hours ago

          Depending what exactly the OP needs, they may even be able to do it just using multi-account containers (sandboxed tab groups) in Firefox.

          • Tippon@lemmy.dbzer0.comOP
            link
            fedilink
            English
            arrow-up
            2
            ·
            2 hours ago

            Unfortunately that won’t work for me, I need them to be completely separate. I’ve got physical and mental issues that mean I get brain fog, and then get things muddled up. If the tab groups share things like bookmarks or saved logins, there’s a chance that I’ll open the wrong link, or log in to the wrong email.

            • Björn@swg-empire.de
              link
              fedilink
              arrow-up
              1
              ·
              2 hours ago

              KDE’s Activities could help you. They are basically completely different desktop layouts and open programs for different tasks. You could set up one for each website with a different Firefox and Thunderbird profile and desktop wallpaper and other things.

            • MagnificentSteiner@lemmy.zip
              link
              fedilink
              English
              arrow-up
              1
              ·
              2 hours ago

              The tab groups work by sandboxing a site to a specific one. Once you have it set up, every time you go to a site it’ll open in the correct tab group. Each tab group has it’s own seperate cookies.

              If it’s the same website with multiple different logins you’re using though then yeah, this wouldn’t help at all.