NTFS Samba share no write permissions on Win 10

I need some help with my Samba share settings.
I have an NTFS formatted SATA HDD attached to the Vero 4K+ with a SATA to USB 3 docking station.
In /etc/fstab I added the following line:

UUID=1822F42222F40692 /mnt/BackupDrive ntfs defaults,noatime,auto,nofail,x-systemd.mount-timeout=30 0 0

Read access from my Windows 10 PC works fine. Pretty slow at 10 MB/s though.
But the issue is I can’t write to the drive, it says access denied: Untitled

Writing on automounted exFAT USB drive and NTFS USB external HDD works fine. The SATA HDD won’t show in Windows that way though, only when mounted via fstab.

Maybe smb-local.conf needs some edtiting?
Any help is appreciated.

NTFS will be slow as it goes through FUSE.
Remove the fstab line and reboot, we’ll automatically mount the drive under /media and if you have installed Samba via the App Store, we’ll share it with RW access.

Hi Sam,
thanks but that results in an empty share.
I.e. \OSMC\BackupDrive is an empty folder.

edit: of course its empty because it’s just a directory, right?
But the mounted drive, which is just named Backup, is not visible on Windows.

It should be. Maybe try rebooting the PC in case the shares have not refreshed.
Can you confirm that it’s visible under /media (i.e. that it’s being auto mounted correctly)?


Reeboted, but it’s not there.
The HDD is visible under /media, I have access using FileZilla SSH file transfer protocol.
It’s also visible twice on OSMC itself, under Video/Files/Backup and Video/Files/Auto-mounted drives/Backup, if that helps.

Can you follow some of the troubleshooting steps from this recent thread?

OK, working on it.
net use \\\osmc /user:osmc and net view \\ gives two resources:
BackupDrive (Auto-mount Volume) and osmc (OSCM Home Directory).

So why is BackupDrive still there? I wondered before why it’s still there in windows explorer under \OSMC.
Google suggests to delete the file /var/lib/samba/usershares/backupdrive
Good idea?

So I removed the usershares/backupdrive file.
That also removed it from windows explorer - only osmc home directory remains.

net use \\\osmc /user:osmc and net view \\ says:

Samba 4.5.16-Debian

Freigabename  Typ     Verwendet als  Kommentar

osmc          Platte  (UNC)          OSMC Home Directory
Der Befehl wurde erfolgreich ausgeführt.

Can’t connect to \\Backup in windows explorer.

net use /delete \\\osmc followed by net use \\\Backup /user:osmc says system error 53 - can’t find network path.

smbclient -L localhost says:

Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.5.16-Debian]

    Sharename       Type      Comment
    ---------       ----      -------
    osmc            Disk      OSMC Home Directory
    IPC$            IPC       IPC Service (Samba 4.5.16-Debian)

Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.5.16-Debian]

    Server               Comment
    ---------            -------
    OSMC                 Samba 4.5.16-Debian

    Workgroup            Master
    ---------            -------
    WORKGROUP            OSMC

Here’s my logs: https://paste.osmc.tv/nokarociga

Seems “Backup” might not be the bet name. Can you change the label of the partition/disk to something more unique e.g. Backup_2T

Apr 26 22:18:40 osmc sudo[1403]:     osmc : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/net usershare add Backup /media/Backup Auto-mount Volume osmc\osmc:f
Apr 26 22:18:40 osmc sudo[1403]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 26 22:18:40 osmc udisks-glue[631]: net usershare add: share name backup is already a valid system user name
Apr 26 22:18:40 osmc sudo[1403]: pam_unix(sudo:session): session closed for user root

It’s back! Changing the label did the trick.

However, I still can’t write to the drive…

Thats because it is only mounted read-only.
/dev/sda1 /media/Backup fuseblk ro

Could it be that the filesystem was not cleanly unmounted? Suggest to connect it to windows PC run chkdsk on it and then eject safely before reconnect to OSMC.

1 Like

That seemed to be the case.
Running chkdsk (no errors) and turning the drive offline in windows, shutting down and remove didn’t help, it was still mounted as ro.

What I did then is run ntfsfix, i.e.:

sudo ntfsfix /dev/sda1

which put out:

Mounting volume… Metadata kept in Windows cache, refused to mount.
Attempting to correct errors…
Processing $MFT and $MFTMirr…
Reading $MFT… OK
Reading $MFTMirr… OK
Comparing $MFTMirr to $MFT… OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition… OK
Going to empty the journal ($LogFile)… OK
Checking the alternate boot sector… OK
NTFS volume version is 3.1.
NTFS partition /dev/sda1 was processed successfully.

After that, the drive was mounted as rw. :smiley:

Thanks for the help!

1 Like