LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   cannot create new files on fat32 via nfs (https://www.linuxquestions.org/questions/linux-networking-3/cannot-create-new-files-on-fat32-via-nfs-187100/)

TheOneAndOnlySM 05-28-2004 06:10 PM

cannot create new files on fat32 via nfs
 
i have a network file system (server and client) setup to share a fat32 partition

whenever i try to create a new file onto it (logged in as any user, including root), i get this error: cp: cannot create regular file `/mnt/infinitefat32/file.zip': Operation not permitted

if i am in that mounted directory (infinitefat32) and use vi to create a new file, i get an error that says "file does not exists"

the only way to get around this problem is to use "touch file.extension" and then copy the file or create a file with vi

i can work with my fat32 partition locally without any of these problems; i can also use the mkdir command over the network without a problem; my nfs ext3 partition works perfectly

i know of the problems with fat32 on nfs, but i didn't expect creating files to be an issue

here is my /etc/exports file
/mnt/oldslack 192.168.0.2(rw,sync)
/mnt/fat32 192.168.0.2(rw,sync)

hosts.deny
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL

and hosts.allow
portmap: 192.168.0.2,192.168.0.5
lockd: 192.168.0.2,192.168.0.5
rquotad: 192.168.0.2,192.168.0.5
mountd: 192.168.0.2,192.168.0.5
statd: 192.168.0.2,192.168.0.5


any ideas?

TheOneAndOnlySM 06-02-2004 03:32 PM

i've also experienced this problem while trying to export other ext3 partitions under /mnt

this time, i couldn't even mount those partitions, telling me that the server said "permission denied" even though my config files were correct

then i had this wild idea that the server didn't know how to export or mount things over nfs that were mounted locally; so instead of leaving the export locations open, i simply closed them with a "/"; and what do you know, i can now mount and write to these ext3 partitions!

of course i converted to ext3 hoping it would solve the fat32 problems, but it seems that all that was necessary was to make the paths more specific; so i haven't tested on exported fat32's, but i believe that this would have solved my problem

so my hosts.allow and hosts.deny are exactly the same, except now, my exports file looks like (notice that the paths end with backslash, where they didn't in my above post:

/mnt/data/ 192.168.0.2(rw,sync)
/mnt/oldslack/ 192.168.0.2(rw,sync)


and it works!

*edit: one thing to watch out for, though, is that permissions will be kept alive on these ext3 partitions... but only uid's will be authenticated, meaning that if locally i created the user "localuser" which defaulted to the next available uid witht he adduser tool and then created another user on the other computer "otheruser" which defaulted to the next available, files created by localuser can only be viewed by otheruser, even if i create localuser on the other computer....

note that not even mounting and trying to work with the files as root remotely would work because nfs will remap "root" to the user "nobody" unless the option no_root_squash is given.... and that is the option that i added for /mnt/data/ since it isn't another linux install, just a data partition that anyone on my network can do as they please with

so now my entry looks like:
/mnt/data/ 192.168.0.2(rw,no_root_squash,sync)

another way around this is to give full permissions to everything in that partitions by locally doing chmod 777 /mnt/data and chmod 777 -R /mnt/data (though this would have to be done every time a new file is created on that partition if you want remote users to work with that file)


All times are GMT -5. The time now is 01:07 PM.