Having trouble mounting SMB shares in LXC
For starters, I’m ultra new to proxmox and linux. I have my old PC running proxmox in the corner of my room so I can play around and learn it.
I have my main server (running Windows) sharing an attached hard drive as a samba share for other computers on my network. I can’t seem to mount this share in a fresh LXC, but I can in a PlexMediaServer LXC I created using tteck helper scripts. I’ll just attach what I’m doing below. Both are using the same container template (Ubuntu 22.04).
Plex LXC
<span style="color:#323232;">root@plex:~# mkdir -p /mnt/wddrive
</span><span style="color:#323232;">root@plex:~# mount -t cifs //192.168.1.3/Media /mnt/wddrive -o username=myusername,password=mypassword
</span><span style="color:#323232;">root@plex:~# ls -la /mnt/wddrive
</span><span style="color:#323232;">total 73409600
</span><span style="color:#323232;">drwxr-xr-x 2 root root 4096 Sep 2 13:48 .
</span><span style="color:#323232;">drwxr-xr-x 3 root root 4096 Sep 3 13:40 ..
</span><span style="color:#323232;">-rwxr-xr-x 1 root root 14340 Jul 8 08:15 .DS_Store
</span><span style="color:#323232;">drwxr-xr-x 2 root root 0 Jul 5 16:50 Books
</span><span style="color:#323232;">drwxr-xr-x 2 root root 0 Jun 1 14:53 Financial
</span><span style="color:#323232;">drwxr-xr-x 2 root root 0 Aug 24 08:20 'HOA Documents'
</span><span style="color:#323232;">drwxr-xr-x 2 root root 0 Aug 26 13:09 Movies
</span><span style="color:#323232;">-rwxr-xr-x 1 root root 414702 Jul 8 10:37 PXL_20220114_214638675.PORTRAIT.jpg
</span><span style="color:#323232;">drwxr-xr-x 2 root root 0 Sep 2 13:55 'Plex Lib Files'
</span><span style="color:#323232;">drwxr-xr-x 2 root root 0 Aug 31 16:32 'TV Shows'
</span><span style="color:#323232;">-rwxr-xr-x 1 root root 17408 Jul 14 19:42 Thumbs.db
</span><span style="color:#323232;">-rwxr-xr-x 1 root root 53934080 Aug 31 18:36 com.plexapp.plugins.library.db
</span><span style="color:#323232;">-rwxr-xr-x 1 root root 420 Mar 15 20:38 'make show folders.bat'
</span><span style="color:#323232;">-rwxr-xr-x 1 root root 173497 Jul 8 10:28 photo_2023-05-20_20-34-59.jpg
</span><span style="color:#323232;">-rwxr-xr-x 1 root root 3252 Aug 31 18:41 'plex reg.reg'
</span><span style="color:#323232;">-rwxr-xr-x 1 root root 53243232462 Nov 27 2022 takeout-20221128T031130Z-001.zip
</span><span style="color:#323232;">-rwxr-xr-x 1 root root 21873610486 Nov 27 2022 takeout-20221128T031130Z-002.zip
</span><span style="color:#323232;">root@plex:~#
</span>
Fresh LXC Spinup
<span style="color:#323232;">root@testcontainer:~# mkdir -p /mnt/wddrive
</span><span style="color:#323232;">root@testcontainer:~# mount -t cifs //192.168.1.3/Media /mnt/wddrive -o username=myusername,password=mypassword
</span><span style="color:#323232;">mount: /mnt/wddrive: permission denied.
</span><span style="color:#323232;">root@testcontainer:~# ls -la /mnt/wddrive
</span><span style="color:#323232;">total 8
</span><span style="color:#323232;">drwxr-xr-x 2 root root 4096 Sep 3 20:42 .
</span><span style="color:#323232;">drwxr-xr-x 3 root root 4096 Sep 3 20:42 ..
</span><span style="color:#323232;">root@testcontainer:~#
</span>
I think it’s pretty obvious that I have a problem with permissions on the bare LXC that I don’t with whatever that script is going to set up the LXC and install Plex for me. I’d like to be able to mount network shares as easily as this on all my other LXCs as well. Can anyone point me in the right direction?
Add comment