Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

How to export vfat partition correctly?

Reply
 
Thread Tools Display Modes
  #1  
Old 10-22-2003, 04:15 PM
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
(E-Mail Removed) -- NOTE: Remove "BOGUS" from email address to reply.



Chris Carlen
Reply With Quote
  #2  
Old 10-23-2003, 01:33 AM
Jeroen Geilman
Guest
 
Posts: n/a
Default Re: How to export vfat partition correctly?

Chris Carlen <(E-Mail Removed)> 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  
Old 10-24-2003, 04:25 AM
Chris Carlen
Guest
 
Posts: n/a
Default Re: How to export vfat partition correctly?

Jeroen Geilman wrote:
> Chris Carlen <(E-Mail Removed)> 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
(E-Mail Removed)
Suse 8.1 Linux 2.4.19

Reply With Quote
  #4  
Old 10-25-2003, 11:49 AM
Tauno Voipio
Guest
 
Posts: n/a
Default Re: How to export vfat partition correctly?


"Chris Carlen" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Jeroen Geilman wrote:
> > Chris Carlen <(E-Mail Removed)> 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

Tags
correctly, export, partition, vfat

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


All times are GMT. The time now is 03:47 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.