Fråga:
Hi guys. I finally have my ubuntu up and running.
I have a USB-drive which is often connected to my ubuntu-machine. I want to share this via Samba but I can't set the user-rights. If I try to acces the file (via windows machine) I can see the directory but if I open it it gives me: \\Computer\media\directory is not accesible. You might not have permission to use this network resource.
I tried setting the rights but it just 'changes back immediately'. I found some posts about not being able to set rights via ubuntu on a ntfs disk.
If I mount it via fstab it will give an error when the USB-drive is not connected. So that's no option.
Is there a way to share this drive via my Samba server?
Oh, by the way. I did get acces to a partition on my linux-machine, to I assume my samba-settings are correct.
Please help this ubuntu-newbie.
Svar/lösning:
The external ntfs drive will mount with you as owner and with permissions for only you to access it. To fix that make the remote user look like you:
Add the following line to your smb.conf file:
force user = your-user-name
Where you put that line depends on what method of samba sharing you used. If you used usershare ( from Nautilus ) then put it in the [global] section. If you used the classical method then add it to the share definition itself within smb.conf.
Jag använde "Sambaserverkonfigurationsverktyg 1.2.63" (system-config-samba i Programhanteraren) och om man använt det verktyget, lagt till en utdelning, sedan redigerat smb.conf och därefter använder verktyget igen för ytterligare en utdelning så måste man peta tillbaka den saknade raden för varje utdelning. Verktyget skriver alltså över det manuellt ditskrivna. Tillägg: Nej, nu när jag gjorde ett test så fanns raderna kvar. =??
Tillägg: Detta med force user = your-user-name behöver man göra även om det är en intern disk med NTFS.
Lägger till sökvägen till smb.conf - /etc/samba/smb.conf