Networking Forums

Networking Forums > Computer Networking > Linux Networking > Mounted fat32 folder is read-only on network

Reply
Thread Tools Display Modes

Mounted fat32 folder is read-only on network

 
 
William Hanson
Guest
Posts: n/a

 
      04-01-2006, 07:21 PM
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 =----
 
Reply With Quote
 
 
 
 
Lenard
Guest
Posts: n/a

 
      04-01-2006, 10:13 PM
William Hanson wrote:

> 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>

> 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
 
Reply With Quote
 
Robert Newson
Guest
Posts: n/a

 
      04-02-2006, 09:17 PM
William Hanson wrote:

> 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.
--
Outgoing mail certified virus free...
It has gone nowhere near a Windwos machine before my ISP.

 
Reply With Quote
 
Bruce Coryell
Guest
Posts: n/a

 
      04-03-2006, 12:09 AM
Robert Newson wrote:
> William Hanson wrote:
>
>> 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?
 
Reply With Quote
 
Robert Newson
Guest
Posts: n/a

 
      04-03-2006, 03:46 PM
Bruce Coryell wrote:

> Robert Newson wrote:
>
>> William Hanson wrote:

....
>>> 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.

 
Reply With Quote
 
Bruce Coryell
Guest
Posts: n/a

 
      04-03-2006, 11:58 PM
Robert Newson wrote:
> Bruce Coryell wrote:
>
>> Robert Newson wrote:
>>
>>> William Hanson wrote:

>
> ...
>
>>>> 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.
 
Reply With Quote
 
Robert Newson
Guest
Posts: n/a

 
      04-04-2006, 09:54 AM
Bruce Coryell wrote:

....

>>> 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?

....

>> 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).

....

> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to share a folder in read only to everbody (authendicated and Luca Windows Networking 1 05-02-2008 07:55 AM
Apache not serving from CIFS-mounted share, works if it's mounted asSMBFS Rick Onanian Linux Networking 3 03-27-2008 07:45 PM
only 5 computers allowed to read the shared folder at once Colin Wireless Networks 4 10-20-2006 04:38 PM
Need advice for a wall-mounted patch panel for home network BIOSMonkey Windows Networking 8 01-18-2006 03:49 PM
help! - NTFS network drive mounted smbfs has invisible files? Jeff Linux Networking 0 08-06-2003 10:07 PM



1 2 3 4 5 6 7 8 9 10 11