4

I've set up samba and everything works whenever I share folders that are in my /home directory, but when I try sharing an entire NTFS partition I get access denied on my windows 10 machine. I've tried giving myself ownership over the partition like it is detailed here: How do I share a folder on a NTFS partition over the network? yet I still can't access the partition from my windows computer. The partition is located on an external disk connected via USB, don't know if that matters.

5
  • I think your mount point for the hard disk is changing when you remove and reconnect the drive to the computer. That's why you are not getting the permission denied. Can you check if that's the case? Mar 25, 2018 at 14:29
  • I agree with @AvishekSaha. The mount points change on USB drives causing problems with shares and direct connections. It's an older answer but it should still work for setting the USB so it doesn't change: askubuntu.com/a/795821/231142
    – Terrance
    Mar 25, 2018 at 15:28
  • Well, the thing is, ubuntu is installed on that very external disk as well, I don't plug it out at all. I did what Terrance suggested and it still doesn't work.
    – user5672
    Mar 25, 2018 at 15:58
  • 2
    Is the NTFS partition mounted to something like /media/user5672/XYZ? If it is then changing permissions on the XYZ part will do you no good since the system will not allow anyone to get past /media/user5672 but user5672. Edit /etc/samba/smb.conf and in the [global] section add this line without quotes "force user = user5672". Or change the mount mount to reside under /media directly as in /media/XYZ.
    – Morbius1
    Mar 25, 2018 at 16:08
  • @Morbius1 Yes, that was the case, and adding that line in the global settings did the trick. Thank you very much!
    – user5672
    Mar 25, 2018 at 16:59

1 Answer 1

0

@Morbius1's comment above works.

If your NTFS partition is mounted under /media/USERNAME/SOME_NAME, than add to /etc/samba/smb.conf under the [global] section the next line:

force user = USERNAME

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .