Mounted fat32 folder is read-only on network

Mounted fat32 folder is read-only on network

Post by William Hanso » Mon, 03 Apr 2006 04:21:09



I'm trying to share a windows fat32 folder across a network.  It's on a
dual-boot PC, running Fedora Core 4.  I can read and copy files out of
it from the networked win98 and winxp pcs, but cannot write to it from
them.  I can read and write to it from the host PC. I can read and write
to shared linux directories from the networked pcs; why can I not do the
same with a mounted fat32 folder?

The line in fstab that mounts the drive is
/dev/hda5       /mnt/drives/win_d       vfat    user,rw,gid=500,umask=002       0 0

The section in smb.conf that shares it is
[Docs-D]
        comment = Monorail D shared
        path = /mnt/drives/win_d/mydocs
        read only = No
        guest only = Yes

I've tried it with guest ok = Yes and guest only =Yes; neither will
allow me to write to it from other pcs.

Any suggestions on what I'm missing?

On a related note, can someone suggest a reference for Samba that lists
what the lines cause to happen?  I want to know the nuts and bolts; I
hate just aping something out of a howto.

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----

 
 
 

Mounted fat32 folder is read-only on network

Post by Lenar » Mon, 03 Apr 2006 07:13:10



> I'm trying to share a windows fat32 folder across a network.  It's on a
> dual-boot PC, running Fedora Core 4.  I can read and copy files out of
> it from the networked win98 and winxp pcs, but cannot write to it from
> them.  I can read and write to it from the host PC. I can read and write
> to shared linux directories from the networked pcs; why can I not do the
> same with a mounted fat32 folder?

> The line in fstab that mounts the drive is
> /dev/hda5     /mnt/drives/win_d       vfat    user,rw,gid=500,umask=002       0 0

And you exactly is this user??? Is it guest???

Try using; /dev/hda5    /mnt/drives/win__d  vfat  users,rw,exec  0 0

<snip>

Quote:> On a related note, can someone suggest a reference for Samba that lists
> what the lines cause to happen?  I want to know the nuts and bolts; I
> hate just aping something out of a howto.

Install samba swat rpm for you version of samba and use it. Samba swat
provides you with complete help for all of them lines.

--
"A personal computer is called a personal computer because it's yours,
Anything that runs on that computer, you should have control over."
Andrew Moss, Microsoft's senior director of technical policy, 2005

 
 
 

Mounted fat32 folder is read-only on network

Post by Robert Newso » Tue, 04 Apr 2006 06:17:36



> I'm trying to share a windows fat32 folder across a network.  It's on a
> dual-boot PC, running Fedora Core 4.  I can read and copy files out of
> it from the networked win98 and winxp pcs, but cannot write to it from
> them.  I can read and write to it from the host PC. I can read and write
> to shared linux directories from the networked pcs; why can I not do the
> same with a mounted fat32 folder?

I'm no expect on samba...my set up works for me, but I don't use guests.

Quote:> The line in fstab that mounts the drive is
> /dev/hda5     /mnt/drives/win_d    vfat    user,rw,gid=500,umask=002    0 0

> The section in smb.conf that shares it is
> [Docs-D]
>     comment = Monorail D shared
>     path = /mnt/drives/win_d/mydocs
>     read only = No
>     guest only = Yes

> I've tried it with guest ok = Yes and guest only =Yes; neither will
> allow me to write to it from other pcs.

A quick perusal of the docs suggests "guest ok = Yes" is the correct option
- I haven't seen "guest only =..."

Quote:> Any suggestions on what I'm missing?

Samba itself can't write to the vfat partition?

Try mounting it (on a temporary basis) with umask=0 and see if that fixes
the problem - ie allows [guests] to write there.
--
Outgoing mail certified virus free...
It has gone nowhere near a Windwos machine before my ISP.

 
 
 

Mounted fat32 folder is read-only on network

Post by Bruce Coryel » Tue, 04 Apr 2006 09:09:49




>> I'm trying to share a windows fat32 folder across a network.  It's on
>> a dual-boot PC, running Fedora Core 4.  I can read and copy files out
>> of it from the networked win98 and winxp pcs, but cannot write to it
>> from them.  I can read and write to it from the host PC. I can read
>> and write to shared linux directories from the networked pcs; why can
>> I not do the same with a mounted fat32 folder?

> I'm no expect on samba...my set up works for me, but I don't use guests.

>> The line in fstab that mounts the drive is
>> /dev/hda5     /mnt/drives/win_d    vfat    
>> user,rw,gid=500,umask=002    0 0

>> The section in smb.conf that shares it is
>> [Docs-D]
>>     comment = Monorail D shared
>>     path = /mnt/drives/win_d/mydocs
>>     read only = No
>>     guest only = Yes

>> I've tried it with guest ok = Yes and guest only =Yes; neither will
>> allow me to write to it from other pcs.

> A quick perusal of the docs suggests "guest ok = Yes" is the correct
> option - I haven't seen "guest only =..."

>> Any suggestions on what I'm missing?

> Samba itself can't write to the vfat partition?

> Try mounting it (on a temporary basis) with umask=0 and see if that
> fixes the problem - ie allows [guests] to write there.

I'm still sorting my own vfat/fstab issue from this morning, but
umask=002 did seem to work.  Now I'm wondering:  what exactly is the
umask parameter and what are we doing when we set it to different values?
 
 
 

Mounted fat32 folder is read-only on network

Post by Robert Newso » Wed, 05 Apr 2006 00:46:13





...
>>> The line in fstab that mounts the drive is
>>> /dev/hda5     /mnt/drives/win_d    vfat    
>>> user,rw,gid=500,umask=002    0 0
...
>> Samba itself can't write to the vfat partition?

>> Try mounting it (on a temporary basis) with umask=0 and see if that
>> fixes the problem - ie allows [guests] to write there.

> I'm still sorting my own vfat/fstab issue from this morning, but
> umask=002 did seem to work.  Now I'm wondering:  what exactly is the
> umask parameter and what are we doing when we set it to different values?

Do you mean umask=000?  Note that for you logged in directly, you could
belong to group with gid=500 which means you'll use the group umask=0 = rwx
= ban nothing.  (see below)

$ man mount
...

Mount options for fat
       (Note: fat is not a separate filesystem, but a common part
       of the msdos, umsdos and vfat filesystems.)

...
        umask=value
               Set the umask (the bitmask of the permissions  that
               are  not  present). The default is the umask of the
               current process.  The value is given in octal.
...

As fat has no idea about *nix permissions, they are "simulated" for *EVERY*
file (and directory) on the partition by the driver.  They are specified at
mount time by the mount option "umask=".

umask is a mask of permissions to ban (/NOT/ permit).  Standard access
permissions for *nix come in three triplets.  The first is for the Owner,
the second for the Group and the third for the World (everyone else).  Each
triplet contains three permissions: Read, Write and eXecute (=search for
directories).

In octal, in each triplet, the bit values are: Read = 4, Write = 2, eXecute
= 1.  Thus your umask=002 breaks down into:

    Owner = 0 -> ban nothing, allow Read, Write and eXecute (rwx)
    Group = 0 -> ban nothing, allow Read, Write and eXecute (rwx)
    World = 2 -> ban Write, allow Read and eXecute (r-x).

ie gives every file on the vfat partition perms of rwxrwxr-x.  If you're in
the World (ie not the "owner" of the file(s), nor part of group gid=500),
you won't have write permissions to any file therein.

Can anyone explain the perms/uid(s) with which samba runs.
--
Outgoing mail certified virus free...
It has gone nowhere near a Windwos machine before my ISP.

 
 
 

Mounted fat32 folder is read-only on network

Post by Bruce Coryel » Wed, 05 Apr 2006 08:58:36






> ...

>>>> The line in fstab that mounts the drive is
>>>> /dev/hda5     /mnt/drives/win_d    vfat    
>>>> user,rw,gid=500,umask=002    0 0

> ...

>>> Samba itself can't write to the vfat partition?

>>> Try mounting it (on a temporary basis) with umask=0 and see if that
>>> fixes the problem - ie allows [guests] to write there.

>> I'm still sorting my own vfat/fstab issue from this morning, but
>> umask=002 did seem to work.  Now I'm wondering:  what exactly is the
>> umask parameter and what are we doing when we set it to different values?

> Do you mean umask=000?  Note that for you logged in directly, you could
> belong to group with gid=500 which means you'll use the group umask=0 =
> rwx = ban nothing.  (see below)

> $ man mount
> ...

> Mount options for fat
>       (Note: fat is not a separate filesystem, but a common part
>       of the msdos, umsdos and vfat filesystems.)

> ...
>        umask=value
>               Set the umask (the bitmask of the permissions  that
>               are  not  present). The default is the umask of the
>               current process.  The value is given in octal.
> ...

> As fat has no idea about *nix permissions, they are "simulated" for
> *EVERY* file (and directory) on the partition by the driver.  They are
> specified at mount time by the mount option "umask=".

> umask is a mask of permissions to ban (/NOT/ permit).  Standard access
> permissions for *nix come in three triplets.  The first is for the
> Owner, the second for the Group and the third for the World (everyone
> else).  Each triplet contains three permissions: Read, Write and eXecute
> (=search for directories).

> In octal, in each triplet, the bit values are: Read = 4, Write = 2,
> eXecute = 1.  Thus your umask=002 breaks down into:

>    Owner = 0 -> ban nothing, allow Read, Write and eXecute (rwx)
>    Group = 0 -> ban nothing, allow Read, Write and eXecute (rwx)
>    World = 2 -> ban Write, allow Read and eXecute (r-x).

> ie gives every file on the vfat partition perms of rwxrwxr-x.  If you're
> in the World (ie not the "owner" of the file(s), nor part of group
> gid=500), you won't have write permissions to any file therein.

> Can anyone explain the perms/uid(s) with which samba runs.

Okay, so exactly what did I do when I set umask=002 - however, it worked
with that setting, so I'm not complaining, just trying to understand this.
 
 
 

Mounted fat32 folder is read-only on network

Post by Robert Newso » Wed, 05 Apr 2006 18:54:29


...

Quote:>>> I'm still sorting my own vfat/fstab issue from this morning, but
>>> umask=002 did seem to work.  Now I'm wondering:  what exactly is the
>>> umask parameter and what are we doing when we set it to different
>>> values?

...

Quote:>> In octal, in each triplet, the bit values are: Read = 4, Write = 2,
>> eXecute = 1.  Thus your umask=002 breaks down into:

>>    Owner = 0 -> ban nothing, allow Read, Write and eXecute (rwx)
>>    Group = 0 -> ban nothing, allow Read, Write and eXecute (rwx)
>>    World = 2 -> ban Write, allow Read and eXecute (r-x).

...

Quote:> Okay, so exactly what did I do when I set umask=002 - however, it worked
> with that setting, so I'm not complaining, just trying to understand this.

Assuming you mean on a fat partition mount, then it means you set the
permissions for every file (and directory) on that partition to rwxrwxr-x
which means the owner (probably root) and the group of users (which, unless
specified, will also be root's group) can read, write, execute/search,
whereas anyone else can only read and execute/search.

Try using different values for umask= and remounting the partition; then
look at the difference it makes to the output of 'ls -l' on a directory in
that partition.
--
Outgoing mail certified virus free...
It has gone nowhere near a Windwos machine before my ISP.