Bluehost.com Web Hosting $6.95

How to export vfat partition correctly?

This is a discussion on How to export vfat partition correctly? within the Linux Networking forums, part of the Linux Forums category; Hi: I have a machine with two vfat partitions mounted as /w98 and /w98d and in which / is an ext3. ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-22-2003
Chris Carlen
 
Posts: n/a
Default How to export vfat partition correctly?

Hi:

I have a machine with two vfat partitions mounted as /w98 and /w98d and
in which / is an ext3.

My /etc/exports has these exported as well as / in the order /, /w98, /w98d.

Trouble is, even when root mounts the vfat partition, the ownership is
user1:users . No other users can see the files. What's wierder is
neither root nor user1 can change the permissions of /w98 or /w98d when
the partitions are mounted.

What would be the best strategy to make the /w98 and /w98d files
available to all users with rw perms?

Thanks for tips.

Good day!


--
__________________________________________________ _____________________
Christopher R. Carlen
Principal Laser/Optical Technologist
Sandia National Laboratories CA USA
crcarle@sandia.gov -- NOTE: Remove "BOGUS" from email address to reply.

Reply With Quote
  #2 (permalink)  
Old 10-23-2003
Jeroen Geilman
 
Posts: n/a
Default Re: How to export vfat partition correctly?

Chris Carlen <crcarle@BOGUS.sandia.gov> randomly warbled in
comp.os.linux.networking:

> Hi:
>
> I have a machine with two vfat partitions mounted as /w98 and /w98d
> and in which / is an ext3.
>
> My /etc/exports has these exported as well as / in the order /, /w98,
> /w98d.


That's...why ?

If you export /, then both /w98 and /w98d are exported as exactly that -
whether or not / itself is exported.

> Trouble is, even when root mounts the vfat partition, the ownership is
> user1:users .


(v)fat has no concept of ownership - YOU have to assign the uid/gid to
mount it with - if you care, since (v)fat doesn't grok this.

> No other users can see the files. What's wierder is
> neither root nor user1 can change the permissions of /w98 or /w98d
> when the partitions are mounted.


No indeedy - and I'll go one step further for you:
NOBODY can ever change the permissions on a mount point when that mount
point is in use, since you cannot reach the original mount point while
it has a filesystem mounted on it - it's just invisible.

As for changing the permissions of the mounted vfat partition...exactly
how many permissions do you think a vfat partition has ? ZERO ;-)

What you should do is SET the permissions you want in /etc/fstab - man
mount and read the options for fat.

Those will be the permissions given to the ENTIRE (v)fat filesystem,
since - again - (v)fat does not do permissions.

> What would be the best strategy to make the /w98 and /w98d files
> available to all users with rw perms?


change /etc/fstab to read:

/dev/hdxy /w98 rw,noatime,auto,umask=000

and similar for the second; this should make everything rw for anyone.

Now change /etc/exports to read:

/ (rw,insecure)

And you should be set!

Mount the yourhost:/ directory somewhere on a remote, and everybody and
his dog will have rw access.

--
Jeroen Geilman

All your bits are belong to us.

Reply With Quote
  #3 (permalink)  
Old 10-24-2003
Chris Carlen
 
Posts: n/a
Default Re: How to export vfat partition correctly?

Jeroen Geilman wrote:
> Chris Carlen <crcarle@BOGUS.sandia.gov> randomly warbled in
> comp.os.linux.networking:
>>I have a machine with two vfat partitions mounted as /w98 and /w98d
>>and in which / is an ext3.
>>My /etc/exports has these exported as well as / in the order /, /w98,
>>/w98d.

> That's...why ?
>
> If you export /, then both /w98 and /w98d are exported as exactly that -
> whether or not / itself is exported.


Unfortunately, it doesn't work that way on my machine. I have correctly
mounted the vfat at /w98 now using your assistance below. The remaining
issue is NFS exporting. If the subdirs of / to be exported are
different physical partitions than /, then they don't export with /.

Example, the server "ting" has the vfat mounted on /w98:

ting:/home/user1 # cat /etc/exports
/ 192.168.0.0/255.255.255.0(rw,insecure)

Now on the client machine "tong" I have in /etc/fstab:

ting:/w98 /ting nfs noauto,rw,hard,intr,user,exec 0 0

Now the client does:

user1@tong:~ $ mount /ting
user1@tong:~ $ l /ting
bin dev home lost+found mnt proc s73 srv tong var w98d
boot etc lib media opt root sbin tmp usr w98
user1@tong:~ $ l /ting/w98
user1@tong:~ $

Notice that it doesn't see anything that's mounted under ting:/w98

When I change the server /etc/exports to:

/ 192.168.0.0/255.255.255.0(rw,insecure)
/w98 192.168.0.0/255.255.255.0(rw)

Then add to the client /etc/fstab:

ting:/w98 /ting-w98 nfs noauto,rw,hard,intr,user,exec 0 0

user1@tong:~ $ mount /ting-w98
user1@tong:~ $ l /ting-w98
Program Files config.sys netlog.txt system.1st
Temp detlog.txt recycled unpack
autoexec.bat frunlog.txt scandisk.log windows[etc]

The same behavior takes place with CDROM mounts, who's mountpoints as
subdirs of / don't export with /, and must be explicitly mentioned in
/etc/exports.


> change /etc/fstab to read:
>
> /dev/hdxy /w98 rw,noatime,auto,umask=000


Yes. This gets the partition mounted on the server so that all have r/w
access. Good.

> / (rw,insecure)
>
> And you should be set!


But this part doesn't work, as described above, I must explicitly export
the /w98 mountpoint of the vfat to be able to nfs mount it on the client.

Can you explain what is going on with this?

Thanks for your input.

Good day!


--
_____________________
Christopher R. Carlen
crobc@earthlink.net
Suse 8.1 Linux 2.4.19

Reply With Quote
  #4 (permalink)  
Old 10-25-2003
Tauno Voipio
 
Posts: n/a
Default Re: How to export vfat partition correctly?


"Chris Carlen" <crobc@BOGUSFIELD.earthlink.net> wrote in message
news:bna63m02rvg@enews2.newsguy.com...
> Jeroen Geilman wrote:
> > Chris Carlen <crcarle@BOGUS.sandia.gov> randomly warbled in
> > comp.os.linux.networking:
> >>I have a machine with two vfat partitions mounted as /w98 and /w98d
> >>and in which / is an ext3.
> >>My /etc/exports has these exported as well as / in the order /, /w98,
> >>/w98d.

> > That's...why ?
> >
> > If you export /, then both /w98 and /w98d are exported as exactly that -
> > whether or not / itself is exported.

>
> Unfortunately, it doesn't work that way on my machine. I have correctly
> mounted the vfat at /w98 now using your assistance below. The remaining
> issue is NFS exporting. If the subdirs of / to be exported are
> different physical partitions than /, then they don't export with /.
>
> Example, the server "ting" has the vfat mounted on /w98:
>
> ting:/home/user1 # cat /etc/exports
> / 192.168.0.0/255.255.255.0(rw,insecure)
>
> Now on the client machine "tong" I have in /etc/fstab:
>
> ting:/w98 /ting nfs noauto,rw,hard,intr,user,exec 0 0
>


Just for check:

Are you trying to export a filesystem that is mounted from another host via
NFS?

It's not permitted. The reason is that the original exporter of the file
system has certain restrictions (in /etc/exports) on the possible users of
the filesystem, but a re-export at another host could render the original
restrictions useless.

HTH

Tauno Voipio
tauno voipio @ iki fi



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:32 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0