Writable samba share problem

I have been trying to get a writeable Samba share to the internal SD card but so far no success. Read-only shares work.

Maybe you have some tips? Here is what I tried to far:


  1. Created a shared directory from the Luci interface, with read-only NOT ticked

Share works, but unfortunately read-only


  1. ssh to the router, chown -R nobody:nogroup /mnt/<dir>.

This gives me ‘Operation not permitted’ errors for all the files on the device and changes nothing


  1. unmount /dev/mmcblk0p1, rmdir /mnt/<dir>, mkdir mnt/<dir>, chown -R nobody:nogroup /mnt/<dir>, reboot router

After the reboot the /mnt/<dir> is root:root again and nothing has changed


  1. change /etc/samba/smb.conf (and the template). Set guest account to root from nobody, restart samba

Now when I mount the samba share I have to enter a password for root. No known password works.



And this is where my limited linux knowledge stops…

I think there are more things to try but I do not know how and google has not offered a solution so far


What I want to try but dont know how:


a) I would like to try option 3 but instead of rebooting I just re-mount the sdcard

If I try this I get an error “mount: can’t read ‘/etc/fstab’: no such file or directory”

/etc/fstab is a link to /tmp/fstab and the file /tmp/fstab does not exist


b) your tips


Forgot to mention: I use the official 2.22 firmware

To enable writable, you have to set up samaba in /etc/config/samba and /etc/samba/smb.conf.templete combined. I think you have done it right in step 4. but I didn’t see you set /etc/config/samba. Maybe luci is not very reliable in settings.

But if you are using v2.22, why not use our UI? There is settings in our UI - Sharing and you can just enable writable.

I have tried sharing from the v2.22 UI, but have not been able to get it to work!

So I should have mentioned that I tried that as well…


The UI is confusing for me when it comes to sharing.

I mean, after enabling it the UI says “contents of USB disks can be shared to Lan or Wan”

If they CAN be shared, does that mean I have to do something else as well?

If they already ARE shared after my action the message should say “contents are currently shared to Lan or Wan”


Anyway, after enabling this option I can not connect to any samba shares, so I guessed earlier that it did not work…

It would be very helpful if the UI showed all shares, like ‘\;sharename>’


Also, as far as I can find there is no option to stop sharing USB disks from the UI?


And these conclusions are why I tried sharing through the advanced interface…



About your other suggestion and /etc/config/samba - I did not know about this file!

I have tried your suggestion and added “option guest_account ‘root’” line to this file

After a restart of Samba not much has changed.

I still have to provide a password when I want to access the share, and no known password works.


can you tell me:

The model of the device: I think it is MT300A, right?

The filesystem you are using in the microSD card.

The content of /etc/config/samba

The content of /etc/samba/smb.config.template

Yes the device is a GL-MT300A 256MB


Your hint about filesystem solved this problem for me! I changed from NTFS to ext4, after this I was able to connect and write to the samba share.


I used the share option in the V2.22 UI to create the share, in the advanced options I noticed which shares get created and I could connect. Comparing new and old samba config files I could not find differences, so filesystem must have been it.


Two more related questions that I hope you can answer:


  1. Writing and reading to/from the Samba share is very slow (1,5MB/4,5MB per second). I connect to the router using wifi. The SD Card I use can do much more. Is the reason for this limited hardware in the router or should I be able to make a higher speed?


  1. Is it possible to format the internal SD card from the busybox shell? What is the command? (Linux newbie here)


If it is 4.5 MByte, then the speed is OK. The chip cannot achieve too much speed.