After hours of searching, I discovered that the share name and the share directory cannot be the same (and it's not case-sensitive, either). See this post on serverfault.

So, if I change my share name in smb.conf from:

[Music]

to

[Tunes]

I can both read and write to the share. No other changes to my smb.conf were necessary, and no need to chmod 0777.

Answer from the_meter413 on askubuntu.com
Discussions

debian - Can't make samba share writable - Unix & Linux Stack Exchange
I'm trying to make my samba share (running on Debian 10) writable but it seems that anything I try just breaks the share and I cannot access it anymore. ... [MediaServer4TB] comment = Media Server 4TB browseable = yes path = /media/sf_filesrvr guest ok = no read only = no create mask = 0600 directory mask = 0700 security = user encrypt passwords = yes force user = root writeable ... More on unix.stackexchange.com
🌐 unix.stackexchange.com
May 1, 2022
permissions - Samba (Cannot Write) issue - Stack Overflow
I have setup Samba between two linux boxes (Ubuntu Desktop 12.10 and Ubuntu Server 12.04). For some reason I cannot write to my samba share. To me it looks like I have the correct permissions. B... More on stackoverflow.com
🌐 stackoverflow.com
Can't write to samba share on Windows 11 despite changing the samba config
Creating a bug report/issue Required Information DietPi version | G_DIETPI_VERSION_CORE=8 G_DIETPI_VERSION_SUB=18 G_DIETPI_VERSION_RC=2 G_GITBRANCH=‘master’ G_GITOWNER=‘MichaIng’ Distro version | bullseye 0 Kernel version | Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 ... More on dietpi.com
🌐 dietpi.com
12
0
June 8, 2023
readwrite - Can't Write to Samba Share - Raspberry Pi Stack Exchange
I've a Raspberry Pi acting as a NAS server. It correctly mounts my drive and shares it through Samba, however, even though I can connect to the share and read stuff, I can't write anything to the d... More on raspberrypi.stackexchange.com
🌐 raspberrypi.stackexchange.com
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › projects › networking and servers
[SOLVED]SAMBA: Can read but can't write to shared drive - Raspberry Pi Forums
The 'root' group has 'read' and 'entry/execute' permissions on the share, the same goes for any other user. If you just want a share anybody can read and write to, just change the permissions for others 'chmod 777 /media/USBHDD1/shares' For more info see here: https://wiki.samba.org/index....
🌐
Linux Mint Forums
forums.linuxmint.com › board index › main edition support › networking
[SOLVED] Unable to write to Samba Share - Linux Mint Forums
September 7, 2025 - After some updates to the credentials and the uid/gid, it appears to be working now! Appreciate the point in the right direction. Can also confirm, the root directory was something created for testing. Once I had the right info, I did place it where I originally planned under /mnt ... altair4 wrote: Sun Sep 07, 2025 6:25 am Just an additional note: The dir_mode=0777,file_mode=0777,noperm will create a "view" of the share that allows everyone read / write access to the share - on the client.
🌐
LinuxQuestions.org
linuxquestions.org › questions › linux-networking-3 › can't-write-to-samba-share-4175706103
[SOLVED] Can't write to samba share
I have an OpenMediaVault server with Samba shares. I can mount them remotely but I can't write to them. I've wrestled with this problem quite a bit in
🌐
Arch Linux Forums
bbs.archlinux.org › viewtopic.php
[SOLVED] Can't write to Samba share on client without chown / Newbie Corner / Arch Linux Forums
I have set up a Samba share on my server that only allows users with the name "smbuser" and the group "smbgroup" to access the share. Said user and group exist on the server. The issue I am having is that on any client machine, the share cannot be written to unless I use `chown myuser -R /mnt/my-share` or sudo privileges.
🌐
Stack Exchange
unix.stackexchange.com › questions › 701039 › cant-make-samba-share-writable
debian - Can't make samba share writable - Unix & Linux Stack Exchange
May 1, 2022 - security = user is a global setting and cannot be in the share definition. (See man smb.conf and notice that the definition has (G) after it rather than (S), showing it much be in the global section ... This awnser solves the problem in case you can mount your share properly with an user/passwd pair and you are able to read the content of the share from a remote client, but you can't write into the share. Of course you need a section in your /etc/samba/smb.conf like this:
Find elsewhere
🌐
DietPi
dietpi.com › troubleshooting
Can't write to samba share on Windows 11 despite changing the samba config - Troubleshooting - DietPi Community Forum
June 8, 2023 - Creating a bug report/issue Required Information DietPi version | G_DIETPI_VERSION_CORE=8 G_DIETPI_VERSION_SUB=18 G_DIETPI_VERSION_RC=2 G_GITBRANCH=‘master’ G_GITOWNER=‘MichaIng’ Distro version | bullseye 0 Kernel v…
Top answer
1 of 1
5

Looks like you created a folder miguel in the media and you have taken ownership of it. Instead, let's create a group, add users to that group, and set the permissions.

sudo groupadd -g 10000 [samba_group]
sudo adduser migeul [samba_group]
sudo chown root:[samba_group] -R /media/migeul
sudo chgrp [samba_group] /media/migeul
sudo chmod 775 -R /media/migeul

This will create a group and attach it to the folder to be shared. You add the users to that group for access. Set the permissions to 775 which gives the owner and the group read-write-execute access while others only read. Set's it recursively.

Verify that you have total access to the folder. With samba, setting the permissions are a little bit different than file permissions with a ubuntu user. What I mean is that verify the permissions after you take ownership because they could result in a samba error later on down the road. Where nobody can access the drive.

Create a samba account that matches your Linux username precisely.

sudo smbpasswd -a miguel
sudo smbpasswd -e migeul

That will prompt you to create a password for the username miguel. Please note that this is only for SMB shares not for the user in the Operating System.

Afterward, open up the samba config and when sharing the drive make sure you type in writable = yes, browsable = yes, read only = no and add your group to it as well. Also, verify the location you are sharing from. Use the place that it is mounted to.

[migeul]
comment = Migeuls folder
​path = /media/migeul
​browsable = yes
​writable = yes
​guest ok = no
​read only = no
​valid users = @[samba_group]

After you reconfig the /etc/samba/smb.conf file, reload it.

sudo smbd reload

These pages go more in-depth with setting up samba shares.

https://help.ubuntu.com/community/Samba/SambaServerGuide https://www.techrepublic.com/article/how-to-set-up-samba-shares-for-groups/

You may also need to set your umask as well. To do that open up /etc/profile using sudo nano /etc/profile and at the bottom type in umask 002. Use Control+O to save and Control+X to exit. Best to reboot the server using sudo reboot and the new mask permissions will take place. That setting re-asserts the same permissions for the users.

🌐
Reddit
reddit.com › r/linuxquestions › samba share won't let me write to it
r/linuxquestions on Reddit: Samba share won't let me write to it
January 24, 2024 -

Basically I have 4 hard drives that I have mounted in a USB dock that's connected to my Proxmox box and passed through to Ubuntu server. For some reason when I mounted the drive, I can see it but it refuses to let me write to it.

I'm open to other ideas if there's something better. Not looking to use TrueNAS or anything else like that due to the fact that it cannot see all 4 of the drives from that stack. Ideally I'd stick with Ubuntu server. I have considered SFTP, but was hoping to get samba shares up for simplicity so my SO can use it without frustration.

Here's what I have setup so far after reading a handful of different stack overflow suggestions, none of them worked.

🌐
Manjaro Linux
forum.manjaro.org › support › network
Can't write to samba share - Network - Manjaro Linux Forum
April 28, 2021 - Hello everybody, I am trying to conduct Samba sharing between 2 Manjaro XFCE systems. I want to be able to mainly write on computer A from computer B. The reason is, the HDD on computer B has got corrupted and I have to…
🌐
Reddit
reddit.com › r/homelab › cannot write to smb share
r/homelab on Reddit: Cannot write to SMB share
January 24, 2022 -

Hey there!

Currently, I can read and execute from the share, but am unable to write to the share. I can write when using the CLI on the server itself, but cannot write when using the share from the client.

I am using Samba 4.13.13-Debian on a Debian 11 server. This is my /etc/samba/smb.conf on the server:

[global]
         server role = standalone server
         map to guest = never
         usershare allow guests = no
         hosts allow = 127.0.0.1 192.168.1.0/24
         hosts deny = 0.0.0.0/0
         security = user
         ntlm auth = true  
[share]
         comment = root
         path = "/root/svr_storage_main/"
         read only = no
         browseable = yes
         writeable = yes
         create mask = 0777
         directory mask = 0777
         guest ok = no
         force user = alex
         force group = alex
         valid users = alex 

And my /etc/fstab on the host that mounts the share:

{SHARE_PATH_REDACTED} /home/alex/svr_share    cifs    username=alex,password={PASSWORD_REDACTED},file_mode=0777,dir_mode=0777    0       0 

The permissions for both the root folder of the share on the server and the root folder that the share is mounted to on the client has been set recursively to drwxrwxrwx as well.

Is there any reason that you can see why this may still not allow me to write to the share?

EDIT: formatted code block section for readability.

🌐
TrueNAS Community
truenas.com › forums › archives › general help › general
Unable to write to SMB share | TrueNAS Community
November 19, 2021 - @Johnpants Your mistake was not to create datasets within your pool. As you've found out, you cannot change the "root dataset" permissions via the WebUI, nor create "root user" SMB shares. If you need to delete the originals then just use the TrueNAS shell and delete folders/files directly ...
🌐
Reddit
reddit.com › r/linuxquestions › can't get write permission on a synology samba share from my debian server
r/linuxquestions on Reddit: Can't get write permission on a synology SAMBA share from my debian server
November 14, 2024 -

Greetings all,

I am fairly new to this, so please accept my apologies in advance :P

So I have debian12 running in a VM (proxmox), I have several apps running like heimdal, immish, emby... that sort of things.

I am trying to install manyfold, but the container apparently needs read permissions, except my files are stored on a synology nas (samba share).

root has access, no problem, but when I switch to my normal user, indeed, I can't write in those folders.

This is my FSTAB : as you can see I have several folders mounted, but I can't write in any of them. There is read/write permissions for the user "batuu" on my synology nas. I tried to mount 3Dfiles with 2 different lines, but no dice so far.

Halp !

startide@halcyon:/media/share$ nano /etc/fstab
GNU nano 7.2                                                                                                       /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# systemd generates mount units based on this file, see systemd.mount(5).
# Please run 'systemctl daemon-reload' after making changes here.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=5cc0304f-07ea-4b83-bc7e-298a7cd6b190 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=0b652e05-ecff-4e01-b28c-1f0191ee7100 none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
#network share for emby
//192.168.1.25/movies /media/share/movies cifs username=batuu,password=redacted 0 0
//192.168.1.25/series /media/share/series cifs username=batuu,password=redacted 0 0

#network share for himlish
//192.168.1.25/photos /media/share/photos cifs username=batuu,password=redacted 0 0

#network share for manyfold
# //192.168.1.25/3Dfiles /media/share/3Dfiles cifs uid=1000,gid=1000,username=batuu,password=redacted,uid=1000,gid=1000 0 0
//192.168.1.25/3Dfiles /media/share/3Dfiles cifs guest,uid=1000,username=batuu,password=redacted,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm 0 0
🌐
Reddit
reddit.com › r/linuxquestions › yet another samba share issue... can't write to the share
r/linuxquestions on Reddit: Yet another Samba share issue... can't write to the share
March 3, 2025 -

EDIT: Solved. cleared Samba cache and configs worked.

I've been running a share on a raspberry pi for a while, and moving it to a more modern machine with Mint 22.

I started by creating users and groups.

#ensure clean users/groups
sudo deluser --remove-home guest > /dev/null 2>&1
sudo deluser --remove-home general > /dev/null 2>&1
sudo groupdel smbgroup > /dev/null 2>&1
sudo addgroup smbgroup

fnuseradd () {
username=$1
sudo useradd -m -G smbgroup -p $(openssl passwd -1 ${username}) ${username}
sudo chage -I -1 -m 0 -M 99999 -E -1 ${username}
echo -e "${username}\n${username}" | smbpasswd -a ${username} -s
}

#create guest/general, auto set passwords
fnuseradd guest
fnuseradd general

#prep mount location
mkdir /home/general/shares
mkdir /home/general/shares/major
chown -R general:general /home/general
chmod -R a+rwx /home/general

#mounted my large drive in fstab to /home/general/shares/major

#/dev/disk/by-uuid/2ced2f3d-e8e6-4ba1-b89f-94d5f411b9e5 /home/general/shares/major auto nosuid,nodev,nofail,x-gvfs-show 0 0

#samba conf without comments

[global]
workgroup = WORKGROUP
server string = %h server (Samba, Ubuntu)
log file = /var/log/samba/log.%m
max log size = 1000
logging = file
panic action = /usr/share/samba/panic-action %d
server role = standalone server
obey pam restrictions = yes
unix password sync = yes
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
map to guest = bad user
usershare allow guests = yes
[printers]
comment = All Printers
browseable = no
path = /var/tmp
printable = yes
guest ok = no
read only = yes
create mask = 0700
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
[major]
comment = Library
path = /home/general/shares/major
browsable = yes
writeable = yes
valid users = guest general
write list = general
create mask = 0777
directory mask = 0777

sudo systemctl restart smbd nmbd

So I can browse the share with user general, but I cannot write to it - can't create files/folders.

This isn't just from my remote windows machine, it's also local.

root@BeoBalthazar:/home/general/shares/major# smbclient //localhost/major -U general
Password for [WORKGROUP\general]:
Try "help" to get a list of possible commands.
smb: \> mkdir test
NT_STATUS_ACCESS_DENIED making remote directory \test
smb: \> ls
. D 0 Sun Mar 2 13:07:36 2025
.. D 0 Sun Mar 2 13:07:36 2025

13563583456 blocks of size 1024. 12879948040 blocks available
smb: \>

Any idea why I can't write?

🌐
Red Hat
access.redhat.com › solutions › 39647
Unable to write on samba share from windows client. - Red Hat Customer Portal
August 2, 2016 - Configured samba share in 'writeable' mode but for some reason it is read only. [testshare] path= /testshare writable = yes browseable= yes guest ok = yes ... A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.