[Samba] samba and ntfs flash drives ???

ToddAndMargo ToddAndMargo at zoho.com
Fri Mar 4 09:17:35 UTC 2016


>> -----Oorspronkelijk bericht-----
>> Van: samba [mailto:samba-bounces at lists.samba.org] Namens ToddAndMargo
>> Verzonden: vrijdag 4 maart 2016 9:46
>> Aan: samba at lists.samba.org
>> Onderwerp: [Samba] samba and ntfs flash drives ???
>>
>> Hi All,
>>
>> Google is killing me here!
>>
>> Scientific Linux 7.2, 64 bit
>>
>> $ rpm -qa samba
>> samba-4.2.3-11.el7_2.x86_64
>>
>> Is there some trick to mounting an NTFS USB flash drive and
>> sharing it with Samba?
>>
>> I am trying to share an NTFS flash drive with samba.
>> If the drive is not mounted, I can do what I want
>> from Windows 7 and XP on the mount point. I have
>> full access.
>>
>> But, when I mount the stick to the mount point and
>> try to browse the mount with W7 or XP, I get "permission
>> denied". Specifically, from the W7 machines samba log:
>>
>>         ../source3/smbd/uid.c:384(change_to_user)
>>         Skipping user change - already user
>>
>>         ../source3/smbd/open.c:881(open_file)
>>         Error opening file . (NT_STATUS_ACCESS_DENIED)
>>         (local_flags=0) (flags=0)
>>
>> I mount suchlike:
>>
>> # mount -t ntfs -rw -o
>> users,exec,sync,uid=todd,gid=users,fmask=000,dmask=000 /dev/sdc1 /mnt/iso
>>
>> (I know I don't need the masks, but I left them there in case
>> they were needed)
>>
>> After mounting:
>> # ls -al /mnt/iso
>>
>> total 1193
>> drwxrwxrwx. 1 todd users 4096 Mar 3 23:30 .
>> drwxr-xr-x. 13 todd users 4096 Mar 3 21:47 ..
>> -rwxrwxrwx. 1 todd users 122 Apr 12 2011 autorun.inf
>> drwxrwxrwx. 1 todd users 4096 Apr 12 2011 boot
>> -rwxrwxrwx. 1 todd users 383786 Apr 12 2011 bootmgr
>> -rwxrwxrwx. 1 todd users 669568 Apr 12 2011 bootmgr.efi
>> drwxrwxrwx. 1 todd users 0 Apr 12 2011 efi
>> -rwxrwxrwx. 1 todd users 106768 Apr 12 2011 setup.exe
>> drwxrwxrwx. 1 todd users 40960 Apr 12 2011 sources
>> drwxrwxrwx. 1 todd users 0 Apr 12 2011 support
>> drwxrwxrwx. 1 todd users 0 Apr 12 2011 upgrade
>>
>> My smb.conf:
>>
>> [iso]
>> comment = mnt on rn1 -- Mount as M:
>> path = /mnt/iso
>> valid users = @users
>> write list = @users
>> force group = users
>> force user = todd
>> oplocks = no
>> level2 oplocks = no
>> strict locking = no
>> blocking locks = no
>> force create mode = 0000
>> create mode = 0777
>> force directory mode = 0000
>> directory mode = 0777
>> map system = yes
>> map hidden = yes
>> writable = yes
>>
>> Trying simpler:
>>
>> [iso]
>> comment = mnt on rn1 -- Mount as M:
>> path = /mnt/iso
>> force group = users
>> force user = todd
>>
>> Doesn't work either
>>
>> What am I doing wrong?
>>
>> Many thanks,
>> -T

On 03/04/2016 01:06 AM, L.P.H. van Belle wrote:
> Try this one.
> mount -t ntfs-3g /dev/sdX /mnt/usb -o rw
> if needed you must install the ntfs-3g package.
>
>
> Greetz.
>
> Louis

Hi Louis,

    NTFS is fully supported already.  On the Linux side, after
I mount the flash drive, I have full access to it (and several
other NTFS flash drives).

# rpm -qa ntfs\*
ntfsprogs-2015.3.14-2.el7.x86_64
ntfs-3g-2015.3.14-2.el7.x86_64

-T







More information about the samba mailing list