Read AND WRITE from unprivileged LXC container to Proxmox SMB / NFS / CIFS / NAS share
How to bind mount Proxmox NAS ( SMB / NFS / CIFS shares on OpenMediaVault, TrueNAS, Unraid VM etc) running on Virtual Machine and Unprivileged LXC container so this unprivileged LXC container can WRITE back to the NAS?
Why Privileged container can write while Unprivileged cannot (by default) do that?
We will see today the reason and what to do to be able to write from unprivileged container.
In one of the previous videos we already went through the process of adding media library kept in OpenMediaVault Shared Folder and bind mount it on Jellyfin LXC unprivileged container ( were both OMV and Jellyfin were running on Proxmox ):
In that video – as you noticed – the LXC container had only READ permissions on that remote Shared Folder, we could not write from LXC container to OMV running on Virtual Machine.
This is default behaviour and today we will see why is that and what we need to change to be able to also WRITE from any LXC container to any Virtual Machine.
You might also want to watch those videos:
Automatically bind mount NFS/SMB/CIFS share to Proxmox LXC container after reboot with bash script:
==TIMESTAMPS==
0:00 read AND WRITE from unprivileged LXC container to Proxmox VM
1:15 OpenMediaVault VM shared folder configuration
2:10 mount OMV shared folder to Proxmox
7:20 create LXC container
11:10 the reason why you cant write from unprivileged container to Proxmox VM
13:30 how to read AND WRITE from unprivileged container for root user
18:15 read and WRITE from unprivileged container as other user
19:10 create a user on LXC container
22:15 not only Proxmox, it works for all linux distributions
Thank you for watching 🙂
marek@automation-avenue.com
== 37 ==
[ad_2]
source
How to bind mount Proxmox NAS ( SMB / NFS / CIFS shares on OpenMediaVault, TrueNAS, Unraid VM etc) running on Virtual Machine and Unprivileged LXC container so that LXC container can WRITE back to the NAS?
We will see today how it can be done.
In one of the previous videos we already went through the process of adding media library kept in OpenMediaVault Shared Folder and bind mount it on Jellyfin LXC unprivileged container ( were both OMV and Jellyfin were running on Proxmox ):
https://youtu.be/aEzo_u6SJsk
In that video – as you noticed – the LXC container had only READ permissions on that remote Shared Folder, we could not write from LXC container to OMV running on Virtual Machine.
This is default behaviour and today we will see why is that and what we need to change to be able to also WRITE from any LXC container to any Virtual Machine.
Please also see another video where I created a bash script that does all of that automatically every time when you restart Proxmox:
https://youtu.be/Hu1fY0-FvVE
===TIMESTAMPS===
0:00 read AND WRITE from unprivileged LXC container to Proxmox VM
1:15 OpenMediaVault VM shared folder configuration
2:10 mount OMV shared folder to Proxmox
7:20 create LXC container
11:10 the reason why you cant write from unprivileged container to Proxmox VM
13:30 how to read AND WRITE from unprivileged container for root user
18:15 read and WRITE from unprivileged container as other user
19:10 create a user on LXC container
22:15 not only Proxmox, it works for all linux distributions
Hope that helps.
Please let me know if you have any questions
Marek
It is really great explainer. Nothing more, nothing less.
Thanks a lot for sharing your experience.
great video, thx
you don't have enough subscriber )=
great explaination like every time
This is exactly what I was missing. Thank you so much.
This has been absolutely spot, i able able to download file using qbittorrent in an lxc and passing the files straight to my Samba Shared folder😄😄😄😄