Mount SMB Share with write Permission in Proxmox Container

fastest-snail

Member
Aug 24, 2022
8
0
6
So, I have a network storage (SMB) containing Plex media files. I followed this tutorial to mount that storage to my container (unprivileged). I can access the files but don't have permission to write anything to that directory.
How can I make the directory writable?
 

Attachments

  • Screenshot from 2023-05-16 14-07-23.png
    Screenshot from 2023-05-16 14-07-23.png
    30.3 KB · Views: 16
So, I have a network storage (SMB) containing Plex media files. I followed this tutorial to mount that storage to my container (unprivileged). I can access the files but don't have permission to write anything to that directory.
How can I make the directory writable?
This is what I use for my samba server

[Plex-server-pool1_plex_files]
comment= samba on ubuntu
path = /pool1/plex_files
read only = no
browsable = yes
guest ok = no
writable = yes
force user =plex
force group =plex
force create mode = 0664
directory mask = 0775
force directory mode = 0775
valid users = yourusername
public = no
#disable netbios = yes
#browse list = no

for your existing files you could do chmod 664 plex-media

probably also need to change the ownership from nobody to plex

chown -R plex.plex 'plex-media'
 
This is what I use for my samba server

[Plex-server-pool1_plex_files]
comment= samba on ubuntu
path = /pool1/plex_files
read only = no
browsable = yes
guest ok = no
writable = yes
force user =plex
force group =plex
force create mode = 0664
directory mask = 0775
force directory mode = 0775
valid users = yourusername
public = no
#disable netbios = yes
#browse list = no

for your existing files you could do chmod 664 plex-media

probably also need to change the ownership from nobody to plex

chown -R plex.plex 'plex-media'
Thanks for the reply, however, I'm really new to this. Where do you modify the config for the samba server? I just created a share on OMV (another VM on Proxmox) following some random tutorial and have really no idea what I'm doing here. Anyway, I've attached ACL for the shared directory here:
Screenshot from 2023-05-16 17-53-27.png

Also, I get this error when trying to change ownership.
Screenshot from 2023-05-16 17-47-23.png

All of this is just local and not exposed outside of my network, so security is less of a concern for now (however, I'd still like to do it properly later or now if it's easy). I just want to get it operational for now.
 
Thanks for the reply, however, I'm really new to this. Where do you modify the config for the samba server? I just created a share on OMV (another VM on Proxmox) following some random tutorial and have really no idea what I'm doing here. Anyway, I've attached ACL for the shared directory here:
View attachment 50454

Also, I get this error when trying to change ownership.
View attachment 50453

All of this is just local and not exposed outside of my network, so security is less of a concern for now (however, I'd still like to do it properly later or now if it's easy). I just want to get it operational for now.
I think I figured out the problem. I think the problem is with the SMB share that I created. I mounted it on my regular PC (Ubuntu) and it has the same permission issue there as well.
No idea how to fix it though.
 
Can you post the output of the file /etc/samba/smb.conf? Make sure to check for any identifying information first.
 
Can you post the output of the file /etc/samba/smb.conf? Make sure to check for any identifying information first.
Bash:
# This file is auto-generated by openmediavault (https://www.openmediavault.org)
# WARNING: Do not edit this file, your changes will get lost.
#======================= Global Settings =======================
[global]
workgroup = WORKGROUP
server string = %h server
dns proxy = no
log level = 0
log file = /var/log/samba/log.%m
max log size = 1000
logging = syslog
panic action = /usr/share/samba/panic-action %d
passdb backend = tdbsam
obey pam restrictions = no
unix password sync = no
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
socket options = TCP_NODELAY IPTOS_LOWDELAY
guest account = nobody
load printers = no
disable spoolss = yes
printing = bsd
printcap name = /dev/null
unix extensions = yes
wide links = no
create mask = 0777
directory mask = 0777
map to guest = Bad User
use sendfile = yes
aio read size = 1
aio write size = 1
time server = no
wins support = no
disable netbios = yes
multicast dns register = no
# Special configuration for Apple's Time Machine
fruit:aapl = yes
fruit:copyfile = yes
fruit:nfs_aces = no
#======================= Share Definitions =======================
[plex-media]
comment = SMB Share for Plex Media
path = /srv/dev-disk-by-uuid-5yc6h337-8146-4g98-85cf-87bfrfs0c297/plex-media/
guest ok = yes
guest only = yes
read only = no
browseable = yes
inherit acls = no
inherit permissions = no
ea support = no
store dos attributes = no
vfs objects =
printable = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = yes
 
Last edited:

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!