1

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.

  • 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? – Avishek Saha Mar 25 '18 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 '18 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 '18 at 15:58
  • 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 '18 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 '18 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.