Ubuntu – Samba share external USB device

12.04ntfssamba

I managed to share stuff from my Ubuntu 12.04 to my private network, and the data is visible from a Windows machine. I even shared a hdd that has windows on it. So everything seems to work fine.

When I want to share a mounted device (USB pen drive, USB HDD… etc) however, I get from the Windows machine: Access denied on file \…

I realize that this is due to the missing rights on the mounted folder. By default a mounted folder gets the equivalent of 700 : drwx——, and the owner myself. But, I can't seem to change the rights on the external device… they remain 700.

Is there a special trick I need to do in order to share NTFS mounted usb devices?

Thanks

P.S. from this Question I see that NTFS devices can not be shared….is this true? It's a bit strange, because I have in my PC 2 HDD's with 3 NTFS partitions, and I can share them without a problem.

Best Answer

I found the solution, if anybody cares:

The external NTFS drive mounts with me as owner and with 700 permissions, meaning that only I can access it. I found a tip on the ubuntu forums from Morbius1 that I can force the incoming connection to look like me by adding the following line in /etc/samba/smb.conf, in the shared section:

force user = your-user-name

It works great.

Related Question