[SOLVED] Sharing a network folder from an unprivileged LXC for paperless-ngx consumption

user053123

New Member
Jun 1, 2023
4
1
3
There is plenty of online discourse about mounting and accessing a network folder from an unprivileged ProxMox LXC. This is not one of them.

I am attempting to make a specific folder on the unprivileged LXC write-accessible to my Windows 10 daily driver via Network Share folder. In particular, the folder is the /opt/paperless/consume on unprivileged LXC.

I am on 7.4-17.

For those unaware, there is a feature of paperless-ngx where you can specify a folder that the service monitors (default above), and when a file is present, it indexes it, ocrs it, copies it to its permanent home in the paperless-ngx data folder, and then deletes the original file. I'd like to be able to drop select files in there throughout my day into a Windows folder trusting that the above actions happen.

My only real constraint is that I want to avoid making any changes to the PVE host because I'm running a hyper-converged HA cluster across "vanilla" hosts that may grow and I don't want to start syncing host configuration.

This debian paperless-ngx LXC container was generated from one of u/tteckster's amazing helper scripts (many kudos and much karma to you!) in case that's relevant.

Here's what I've tried (Thank God for Quick and Easy Snapshots and rollbacks in ProxMox):
  1. Looked into syncthing, duplicati, rsync. Decided to attempt install syncthing on the container, but even though the service ran and I could curl the GUI from within the container, I could not access it in my browser on my Windows machine. Troubleshot for a bit (firewall, etc.). Abandoned.
  2. Began looking into FOSS for sftp clients and services that could run on windows and integrate a remote sFtp into explorer (WinFSP). Paused on this.
  3. Installed Samba using apt and configured following this guide. Came really close. Could access the folder. Could see and open files already created on the LXC host. Could not create, copy, or save changes from Windows. Windows threw a permissions error. Troubleshot for a while (mostly focused on sambauser permissions on the LXC) Abandoned.
  4. Attempted to apt install nfs-kernel-server. It errored out and I troubleshot finally arriving at "of course a container can't run a kernel module like nfs-kernel-server, maybe try a a user space NFS server like Ganesha-NFS?" (I had no idea; the concepts of kernel-space and user-space had not existed in my mind prior). Abandoned.
Paths forward I am mulling over:
  1. Diving deeper into the Windows + sFTP option
  2. Trying Samba again with fresh eyes and troubleshooting the write permission issue.
  3. Starting fresh and using docker to compose a paperless+syncthing container.
Before I research and pursue other paths, wanted to come to this glorious hivemind...

TL;DR What is the simplest and quickest way (without changes to PVE host) to make a folder on an unprivileged LXC write-accessible in Windows explorer.
 
I did a fresh Samba attempt today and by chmod the directory to 2777 (i know, i know...) the consume folder, the error was resolved.

One day I will learn and internalize linux user, group and permission settings for my homelab use case so I dont have to rely on the crutch of 777...
 
I did a fresh Samba attempt today and by chmod the directory to 2777 (i know, i know...) the consume folder, the error was resolved.

One day I will learn and internalize linux user, group and permission settings for my homelab use case so I dont have to rely on the crutch of 777...


my consume forlder permission is this drwxrwx--- i have a script that changes the prmission automatically because when you restart docker or the container, the folder permission goes back to default permission.
 
  • Like
Reactions: user053123

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!