how can I share a folder in an external USB NTFS formated drive using samba?
So you did not indicate the openSUSE version or Desktop Version or just what folder you want to share. 1st off, if you want to share a USB hard drive, your best bet is to add it to your /etc/fstab file, but that means leaving the drive plugged in and not removing it normally while you are running openSUSE. You can use the YaST / System / Partitioner to add in the USB and some selected NTFS partition to a folder on your main Linux / root partition. In my case, imagine that I share the default Windows partition. In my /etc/fstab file I have the following entry:
/dev/disk/by-id/ata-WDC_WD3000GLFS-01F8U0_WD-WXL408720641-part2 **/windows/C** ntfs-3g defaults 0 0
Then I have added the following entry to my /etc/samba/smb.conf at the end of the file:
[Windows]
path = **/windows/C**
read only = No
acl check permissions = No
inherit acls = Yes
guest ok = Yes
profile acls = Yes
use sendfile = Yes
More info on using Samba can be found at: openSUSE SuSE Linux HOWTOs and Tutorials by Swerdna
You can find a Blog on setting up Samba SWAT here: Samba S.W.A.T. - Samba Web Administration Tool Setup for openSUSE - Blogs - openSUSE Forums
Thank You,
Just an aside:
There is a bunch of properties defined in that [stanza] that imply Linux-type permissions. Linux permissions don’t last beyond the next boot (or for removables, the next unplug) on an NTFS partition. So for all practical purposes the share would really be like this:
[Windows]
path = /windows/C
read only = No
guest ok = Yes
use sendfile = Yes
And I’m curious, James, what is the purpose of adding “use sendfile = yes”? (I haven’t encountered it before).
Here is the definition I found for it:
use sendfile (S)
If this parameter is yes, and the sendfile() system call is supported by the underlying operating system, then some SMB read calls (mainly ReadAndX and ReadRaw) will use the more efficient sendfile system call for files that are exclusively oplocked. This may make more efficient use of the system CPU's and cause Samba to be faster. Samba automatically turns this off for clients that use protocol levels lower than NT LM 0.12 and when it detects a client is Windows 9x (using sendfile from Linux will cause these clients to fail).
Default: use sendfile = false
Consider that like many things, it was suggested to me before by a Samba expert and I have carried it on longer than I remeber why. It surely does not hurt, its still supported and perhaps it helps, but who knows really? I do stick with things that work or don’t hurt in most cases. lol!
Thank You,
On 03/22/2012 10:46 AM, jdmcdaniel3 wrote:
>
> swerdna;2450207 Wrote:
>> Just an aside:
>>
>> There is a bunch of properties defined in that [stanza] that imply
>> Linux-type permissions. Linux permissions don’t last beyond the next
>> boot (or for removables, the next unplug) on an NTFS partition. So for
>> all practical purposes the share would really be like this:
>>>
> Code:
> --------------------
> > > [Windows]
> > path = /windows/C
> > read only = No
> > guest ok = Yes
> > use sendfile = Yes
> --------------------
>>>
>> And I’m curious, James, what is the purpose of adding “use sendfile =
>> yes”? (I haven’t encountered it before).
>
> Here is the definition I found for it:
>
>
> Code:
> --------------------
> use sendfile (S)
>
> If this parameter is yes, and the sendfile() system call is supported by the underlying operating system, then some SMB read calls (mainly ReadAndX and ReadRaw) will use the more efficient sendfile system call for files that are exclusively oplocked. This may make more efficient use of the system CPU’s and cause Samba to be faster. Samba automatically turns this off for clients that use protocol levels lower than NT LM 0.12 and when it detects a client is Windows 9x (using sendfile from Linux will cause these clients to fail).
>
> Default: use sendfile = false
> --------------------
>
>
> Consider that like many things, it was suggested to me before by a
> Samba expert and I have carried it on longer than I remeber why. It
> surely does not hurt, its still supported and perhaps it helps, but who
> knows really? I do stick with things that work or don’t hurt in most
> cases. lol!
>
> Thank You,
>
>
I’m aware of the definition I just don’t understand it LOL . Neither do
you James, oh well, something to do with oplocks… What can I say
except “be well”.
–
Regards
swerdna
So you did not indicate the openSUSE version or Desktop Version or just what folder you want to share. 1st off, if you want to share a USB hard drive, your best bet is to add it to your /etc/fstab file, but that means leaving the drive plugged in and not removing it normally while you are running openSUSE. You can use the YaST / System / Partitioner to add in the USB and some selected NTFS partition to a folder on your main Linux / root partition. In my case, imagine that I share the default Windows partition. In my /etc/fstab file I have the following entry:
is there a way other than adding it to the /etc/fstab file, this is an external drive used for portability, and it was needed to back up some files via network quick and easy, the share was needed only for a moment, this is openSUSE 11.4 32 BIT
On 03/22/2012 03:56 PM, Easgs wrote:
>
> is there a way other than adding it to the /etc/fstab file, this is an
> external drive used for portability, and it was needed to back up some
> files via network quick and easy, the share was needed only for a
> moment, this is openSUSE 11.4 32 BIT
In fstab, set the options section to be “rw,suid,dev,exec,noauto,user,async”.
The device will not be mounted at boot. Whenever you want it to be mounted, any
user can do that with “mount /<MP>”, and unmount it as well.
Always love to read your tidbits of Knowledge Larry, thanks for the info.
Thank You,
On 2012-03-22 22:47, Larry Finger wrote:
> In fstab, set the options section to be
> “rw,suid,dev,exec,noauto,user,async”.
And nofail. Maybe with an NTFS disk it is not needed.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
I have a new blog that provides a bash script that can create all of the required configurations to enable Samba and to use SWAT: SWAT - Samba Web Administration Tool - Setup & Creation Script - 1.03 - Blogs - openSUSE Forums
Thank You,