Automatic mounting vs manual mounting: an issue (NTFS disk)

I have a usb disk attached to my router which has several partitions. I need to share a partition. My issue Is:

  • when I mount such partition through the command mount /dev/sda5 mnt/sda5, the sharing works well as expected.
  • on the contrary, when I put partition data into /etc/config/fstab, restart the router and have the partition mounted, the sharing does not work (Windows tells me that I have insufficient right);
    In fstab I had the following relevant lines:
config mount
        option target '/mnt/sda5'
        option device 'dev/sda5'
        option enabled '1'
        option fstype 'ntfs'.

To have the partition shared, I have to unmount it through Luci, and then mount it manually.
I suppose that the manual mount command has some different default options than fstab... or not? How can I have my partition automatically mounted and shared?

Do ls -l /mnt in both cases to check the ownership and permissions.

After automount in fstab:

root@LEDE:/# ls -l /mnt
drwxr-xr-x    2 root     root             0 Apr 15 14:25 sda1
drwxr-xr-x    2 root     root             0 Apr 15 14:25 sda2
drwxr-xr-x    2 root     root             0 Apr 15 14:25 sda4
dr-x------    1 root     root          4096 Apr 14 15:21 sda5
drwxr-xr-x    2 root     root             0 Apr 15 14:25 sda6
root@LEDE:/#

After manual mount:

root@LEDE:/#  ls -l /mnt
drwxr-xr-x    2 root     root             0 Apr 15 14:25 sda1
drwxr-xr-x    2 root     root             0 Apr 15 14:25 sda2
drwxr-xr-x    2 root     root             0 Apr 15 14:25 sda4
drwxrwxrwx    1 root     root          4096 Apr 14 15:21 sda5
drwxr-xr-x    2 root     root             0 Apr 15 14:25 sda6
root@LEDE:/#

I see the difference. But how can I obtain all the needed rights for automount?

Hmmm. two things look strange in that fstab:

  • 'dev/sda5' is without the starting "/". Probably should be '/dev/sda5'
  • There is a dot after the fstype 'ntfs' option.

Possibly typos in this forum message, but might be genuine errors in the fstab file

Possibly typos in this forum message, but might be genuine errors in the fstab file

Sorry, my typos.

I have the same problem with my ntfs drive, so far the only solution that's worked for me is to mount at boot with this in rc.local (system>startup in luci) -

ntfs-3g /dev/sda* /mnt/your_mount_point -o your,options

I've tried to mount through Luci in System>mount Points with the exact same options and it just doesn't work for some reason, really strange.

Thank you for your reply.

Mike, if I put it in Luci > System > Mount points without any option, the disk is mounted after rebooting the router (but I'm not able to share it). The mounting issue raises for me every time I try to set some mounting options...

That's what mine does too, no options in System>Mount Points will mount my drive but I can't share (permission denied) and if I set my own options it won't mount at all.