Unable to gain write access in samba share drive

I am trying to set up samba share on my asus n13u b1 running 18.06.1. Everything is ok and the drive is mounted to /mnt/sdb1/ i can access it from windows, but the problem is, i only have Read only access.

This is my samba config. I have found multiple solutions online but couldn't solve this issue.

	netbios name = OpenWrt 
	display charset = UTF-8
	interfaces = lo br-lan 
	server string = OpenWrt
	unix charset = UTF-8
	workgroup = WORKGROUP
	bind interfaces only = yes
	deadtime = 30
	enable core files = no
	invalid users = root
	local master = no
	map to guest = Bad User
	max protocol = SMB2
	min receivefile size = 16384
	null passwords = yes
	passdb backend = smbpasswd
	security = user
	smb passwd file = /etc/samba/smbpasswd
	use sendfile = yes

	comment     = Home Directories
	browsable   = no
	read only   = no
	create mode = 0750

	path = /mnt/sdb1
	read only = no
	guest ok = yes

whenever i try to write something or even try to change file name, i see this error https://i.ibb.co/nDnqGP0/permi.jpg

Would really appreciate any help..


Is the actual mount RW ?

can you rename/modify stuff on the attached device directly from the router ?

Yes, i can modify the files on it when it's connected directly to OS(windows/ubuntu) but not from the router, always gives out permission error. The formatting is fat32.

that's not what I asked,

if the device is attached to your router, can you modify the content from the router ( = bypassing the samba) ?

When device is attached to router, I can modify the files using WinSCP, but not from samba in windows or android.

Still not what I mean, but if writing works via scp, then it's not a ro mount.

what's the auth on the mount point ?

There's no user/pass as i am using guest access. I also tried with user/pass and having the same issue.

Several issues here, 18.06.1 is unsupported (ie you're on your own) and it's going to unusable in practice.
If you can get your ancient version of Samba to work it's going to unbearably slow like 3-4mbyte/s using ext3/4 and roughly half of that best using ntfs. You'll also see network latency and throughout issues when accessing your Samba share. Just get something that's more suitable...

I have also tried this with 18.06.7 and 19.07.5. having the same issue in them. Read only access. My current build 18.06.1 seems to be running samba 3, which i think is enough for me for small transfers. The point is why am i having the read only access?

Finally.... After a week of searching some progress, i found a temporary solution from this site...

For anyone facing the same issue, it might help them. I am not sure if i should i call this a bug or just the way how linux permissions work.

Have you installed ntfs-3g ?
And I think you can't use guest with this kind of politics in samba

1 Like

ntfs-3g is installed.
I am not using guest access anymore, although guess access should provide RW permissions but for some reason it doesn't.
It's a temporary fix to use root account to gain RW permissions, because if i use/create any other account, it's goes back to Read only mode. Unless somebody knows a better way.

Do you have the fat32 packages installed?


Also what permissions is there on /mnt/sdb1 ?

Here's mine:

ls -l /mnt
drwxrwxrwx    5 root  root  4096 Jan 24 17:44 sda1
drwxrwxrwx    5 root  root  4096 Jan 24 17:44 sdb1

This command will give full permissions across all mounted volume sub-directories for sdb1:
chmod -R 777 /mnt/sdb1

1 Like
kmod-fs-vfat is installed
dosfstools not installed

I have tried this command before, it's not seems to be doing anything. Permissions remains the same before and after sending the command.

drwxr-xr-x    2 root     root          4096 Dec 31 13:10 System Volume Information
drwxr-xr-x    2 root     root          4096 Feb 25 16:53 config
drwxr-xr-x    6 root     root          8192 Feb 25 23:01 temp

but what's the output after running the chmod command, using ls -l /mnt ?

also what output do you get for sdb1 running this command cat /proc/mounts?

 ls -l /mnt

drwxr-xr-x 8 root root 4096 Feb 26 10:15 sdb1

cat /proc/mounts

/dev/root /rom squashfs ro,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,noatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,noatime 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,noatime 0 0
/dev/mtdblock6 /overlay jffs2 rw,noatime 0 0
overlayfs:/overlay / overlay rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,size=512k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,mode=600,ptmxmode=000 0 0
debugfs /sys/kernel/debug debugfs rw,noatime 0 0
/dev/sdb1 /mnt/sda1 exfat rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,namecase=0,errors=remount-ro 0 0

Does /mnt/sda1 even exist?

If it does exist, try chmod -R 777 /mnt/sda1

we used sdb1 before but the device is mounted on sda1 now

I tried again.. the result is the same. chmod -R 777 /mnt/sda1 is executing but nothing changes in the permissions.

Does /mnt/sda1 even exist? as the device is mounted to sda1

ls -l /mnt/sda1

You might need to create this directory, then apply the permissions

I may have mistyped that line. Whenever usb is removed from router the mount point differs between sda1 and sda2 or vice-versa... I created directory mkdir then applied permissions... chmod -R 777 /mnt/sda1 or sdb2/dir_name...

suppose dir name hello1
mkdir hello1
before chmod
drwxr-xr-x 2 root root 4096 Feb 26 10:59 hello1

after chmod
chmod -R 777 hello1
drwxr-xr-x 2 root root 4096 Feb 26 10:59 hello1

nothing changes...