NFS configuration between fedora&debian on Vfat partition
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
NFS configuration between fedora&debian on Vfat partition
Hello,
I have performed NFS installation on debian(as server) and fedora(as client). I made tests for 2 directories. The first one(from a debian home/somedir directory worked perfectly) but the second one not. This second directory is a hard disk partionned on fat32(vfat in my /etc/fstab file).
I have no error with both command :
Code:
exportfs
in debian and
Code:
mount -a
in fedora(performed as root)
But when I try to browse the mounted directory it's full empty.
Here you are the entire file content :
/etc/exports on debian machine :
Code:
...
## First directory in Debian file system
/home/me_user/testlatex 192.186.1.2(rw,sync,subtree_check,root_squash)
## Second directory : A hard disk mounted on Debian file system
/diskmounted/diskname 192.186.1.2(ro,sync,subtree_check,no_root_squash)
/etc/fstab on fedora machine :
Code:
## Accessing to latex directory on debian(server) from fedora(client)
192.186.1.1: /home/me_user/testlatex /mnt/dir_nfs nfs auto,user,rw,nosuid,noexec 0 0
## Accessing to a fat32 disk on debian from fedora(client)
192.186.1.1:/diskmounted/diskname /mnt/disk_name nfs auto,user,ro,nosuid,noexec,hard,intr 0 0
It doesn't work as well for "nfs" as for "vfat"(after /mnt/disk_name)
Ok. I just clone your /etc/exportfs and /etc/fstab configuration. Both test server and client box are Debian, but I don't think this makes a difference. It works pretty well.
But I did that with an ext3 directory, as I don't have fat partitions in the server (intr and hard options doesn't count then).
So, as far as I understand, we have 2 major aproaches:
* user permissions: you mounted /mnt/disk_name via root. Root can list files of it? If you mount this as a normal user, you have the same problem? And BTW (I know this sounds stupid) but: Root can list files of this directory IN the server (i mean, logged locally into the server box)?
* mounting issues: You may want to check fstab entry for the native fat partition. And execute df command on the client to make sure the directory is mounted.
Also, I think you should use exportfs -a after you change /etc/exportfs.
Sorry I had no clear answer, it's kind a interesting problem.
I have succeed to make the server's nfs directory availaible by mounting it(the vfat partition) in mnt and including him into fstab's file for auto mounting in the server fstab file. Then I kept
Code:
## Accessing to a fat32 disk on debian from fedora(client)
192.186.1.1:/diskmounted/diskname /mnt/disk_name nfs auto,user,ro,nosuid,noexec,hard,intr 0 0
instead of
Code:
## Accessing to a fat32 disk on debian from fedora(client)
192.186.1.1:/diskmounted/diskname /mnt/disk_name vfat auto,user,ro,nosuid,noexec,hard,intr 0 0
Now my question is this : by using rw instead of ro in options liste can that make I can save file from the client?
Thanks again to everybody wich try to help me about this question.
Ok. It seems to be there are some not-so-clear concepts about this.
You have at least 3 instances where permissions are checked.
Client:
Let's suppose a user tries to have access to /mnt/disk_name. In order to save a file, fs must be mounted with read/write permissions. It is done with the "rw" option, as you already guessed.
So, this line
in /etc/fstab. Otherwise, the client system will not allow saving files in this directory, no matter wich are the server settings.
(I also remove the "hard" and "intr" options here. That's because these are vfat specific options, and you should note that you're mounting a nfs fs. The client doesn't know which type of fs /diskmounted/diskname is in.)
NFS service:
The service that exports /diskmounted/diskname has read-only or read/write options too. No matter which are the requests of the client machine, the server will only allow saving files if the directory is exported with rw option. For example:
Code:
/diskmounted/diskname 192.168.0.0/16(rw)
in /etc/exports.
Server system:
Even if you have configured client and nfsd settings to allow read/write operations, directory must be writable by server processes/users (like nfsd itself). You have to check that /diskmounted/diskname is mounted with rw option as you checked in client machine for /mnt/disk_name.
I hope this little explanation will be useful for you. Check mount and exports manual for all available options.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.