Can copy folder with files to network share (samba) but not individual files Mac OS Ventura GL-AXT1800

I have replicated the issue on MacOS Mojave. And I referred to Configure Samba to Work Better with Mac OS X - SambaWiki
and
Mac OS X v10.5, v10.6: About named streams on SMB-mounted NAS, Mac OS X, and Windows servers; "-36" or "-50" alerts may appear - Apple Support
(Disabling named streams)
but didn’t make it work totally okay. Sometimes the errors reported are even inconsistent.
Maybe that will help on your MacOS.

Hi, Can you also check the part of the init script that handles the “smb.conf.template” and “smb.conf.template4”. It looks like when the two files are not the same, template4 always replaces the “.template” file, and a backup copy is store in template4_old.

is there a bug in the script?

I think template4 should only override “.template” when you press the reset for 4 seconds to perform the network reset. During a normal reboot, .template should be kept as it is.

Thanks!

I found that the backup copy operation is executed by /etc/init.d/gl_nas_sys process.
You can disable it once you’ve done the init setup.

/etc/init.d/gl_nas_sys disable

Hi all,

I’ve been following this thread and I managed to get it to work! Im quite new to this, please could someone explain how to edit the /etc/samba/smb.conf from a Mac please? Because at the moment I just edit it from the advanced settings page, services, network sharing, then edit template and this seems to reset each time it reboots.

Thanks in advance.

Please edit “/etc/samba/smb.conf.template” and “/etc/samba/smb.conf.template4”

I still don't have a fix for this after trying everything under the sun. I can manage to get a different error message. I now get this error message: Some files can’t be processed, either because you don’t have permission to modify them, or because they are on a locked volume. @hansome are you still working at GL.iNet?

I am on macOS 15.2 (24C101)

Does this solution work?

I can't use EXT4 since I am using a mac and windows machine to read these files. The windows machine works fine, I really hate mac with a passion. It is a bit ridiculous that I can't get a EXTFAT to work. @dwyeraidan, could you kindly give me your complete smb.conf template code so I can try to make it work. I have a fresh formatted drive like you had and want to copy the exact settings. Please help me get this to work. I spent 10 hours on it today with no progress :frowning: Every time I try to write the drive goes from rw to ro and I have to remount it to get ti back to rw:

root@GL-AXT1800:~# mount | grep /tmp/mountd/disk1_part1

/dev/sda1 on /tmp/mountd/disk1_part1 type exfat (ro,relatime,fmask=0000, dmask=0000, allow_utime=177777, iocharset=utf8,errors=remount-ro)

root@GL-AXT1800:~# sudo mount -o remount,rw /tmp/mountd/disk1_part1

root@GL-AXT1800:~# mount | grep /tmp/mountd/disk1_part1

/dev/sda1 on /tmp/mountd/disk1_part1 type exfat (rw,relatime, fmask=0000, dmask=0000, allow_utime=177777, iocharset=utf8, errors=remount-ro)

This is part of the issue, mostly. ExFAT isn't a good file system for Samba.
If possible, switch to ext4

Hi @robsoprano

I'm unable to check this as I'm not near my setup for a few months. But all the info should be in my post above Can copy folder with files to network share (samba) but not individual files Mac OS Ventura GL-AXT1800 - #17 by dwyeraidan

Just remember to edit both "/etc/samba/smb.conf.template" (in luci, or terminal) and “/etc/samba/smb.conf.template4” in terminal, otherwise changes will revert on reboot.

FWIW I ended up using ext4 anyway because I learnt its best practice to use native filesystems. I use mine for Time Machine backups so I want ext4 journalling incase of a router hardware issue. ExFAT has no journaling so its not great for backups.

Sorry I can't be of more help.