I have been using linux for a couple of years already, very casually, just browser, media, games. Recently I bought dell micro pc and installed proxmox on it. I don’t have a lot of hdds or raid or anything, just one 6tb usb external drive. I know, I could lose everything, but I don’t have anything important in there, just media. It’s a relatively new drive, so I hope it will hold for at least half a year, and then I plan to buy proper hdds.

Hdd is connected to the proxmox host with usb, and then with mount points to lxc containers. Audiobooshelf, samba, qbittorent, all containers are debian 12.

When I download book with qB lxc, it automatically shows up in audiobookshelf (abs) lxc thanks to mount points. Abs can play it but, I can’t change cover, delete, move it etc, because of permissions. This screenshot is from proxmox host.

Same thing happes when I manually upload the book to audiobookshelf, then other lxc containers have problem accessing it. Or when I upload something to the server with samba.

I know how to change it with chmod and chown, but when I download new book it is the same thing again, I don’t want to manually change permissions and ownership every time new folder/file appears in hdd. In lxc container I cant even change ownership, it says: “Operation not permitted” even though I have root.

This is my samba config. It’s terrible and unsecure, but after 2 days of trying to make it work, I just wanted to try everything. I will probably switch to nfs, idk if it will help.

I’m really lost, idk how to make lxc containers talk to each other through those mounts points without breaking permissions/ownership. Is there some other way? Idk if there is a very simple solution and I just made fool of myself. I know that root and 777 eveywhere is bad idea, but I wanted to at least first get everything working. And I don’t plan to connect anything to the internet in the near future anyways.

It’s really late here, and I have to work tomorrow, so I won’t be able to reply until tomorrow evening.

  • nitrolife@rekabu.ru
    link
    fedilink
    English
    arrow-up
    2
    ·
    5 months ago

    the idea is that: all your applications work under the same user. or at least under the same group. because this is exactly how the differentiation of rights is applied.

    A good plan is to create some kind of user in all three containers and run qbittorrent, samba and the third application under it.

    A bad plan is to run everything under a random user with 777 rights, but this is a really bad plan.

    Create a user in all three containers and work under it. That is not hard. Run qbittorent with that user. Config will be there: /home/user/.config . Then set that user for samba. I don’t know third app , but I think you can find how change user in manual.

    • Cossty@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 months ago

      Ok, that doesn’t sound hard. I hope there are no more unforeseeable problems. When I create the new user in containers, should I create the same user in proxmox host and change ownership of the hdd, and all existing files in it, to it? Probably yes, right? Don’t have time today again, will try it tomorrow after work.

      • 4am@lemm.ee
        link
        fedilink
        English
        arrow-up
        2
        ·
        5 months ago

        NFS is always cranky for me, and you can’t get it to use symlinks at all (yeah Samba’s implementation is janky but at least it exists)

        • minnix@lemux.minnix.dev
          link
          fedilink
          English
          arrow-up
          2
          ·
          5 months ago

          NFS does symlinks but they have to be configured correctly.

          Samba may have not given you issues in the past, but it also doesn’t give you any security.

            • minnix@lemux.minnix.dev
              link
              fedilink
              English
              arrow-up
              1
              ·
              5 months ago

              Elaborate on why samba is bad when it comes to security? Like list a bunch of links like this or write a paragraph summarizing them like a chatbot?