I've got an NFS permissions problem, I think, between two RH6.2 machines. I've got a program that is dumping files out of an Oracle database. (I don't have details on how) They are able to overwrite the files in the existing directories when they'rewriting to a local directory, but not when the dir they write to is an NFS Mounted dir on on another machine.
I'm open to any ideas as how to to best make the NFS mount directory permissions as close to the same as a local dir as possible.
I'mexporting the dir in /etc/exports with:(rw,all_squash,anonuid=400,anongid=400)
When I try to delete files I create from a console, I'm told they're read only (but it lets me do it anyway?). The permissions appear to be 644 on files I create. Since I'm the owner (as my user or squashed to 400), why does it ask that? Is that problem why Oracle won't overwrite those files, or something more? More details available on request....
This conversation is currently closed to new comments.
You must check mount command (or /etc/fstab string for this mount) on nfs-client machine, it must have "rw" option (-o rw or rw option in /etc/fstab). Also check permitions for directory on a nfs-host machine, beacause remove, create, rename operation request write permition to user who does that.
rw is the default for the mount command, and both the directory on the host machine and the directory I'm mounting it to on the client have chmod 777 right now, and I still can't get it to work on NFS. I tentatively have a functional setup using SAMBA and a mount -t smbfs, but my Samba permissions are likely a security hole. (I'm looking into it.)
If you are not using NIS, I would suggest starting by adding the same user account to the machine that is exporting the nfs file system, as writes the files being dumped from the Oracle database. Make sure to use the same uid/gid. Then on the Directory being exported you have several options. 1: Change the owner to the new user. 2: Change the group to the new users group and give the group rwx on the Directory.
Your first suggestion seems like a good idea, but I don't think it will work because as I described above, as an individual user (in fact, as the user I suspect Orcale is using)I can create files and then ask to delete them and get the same prompt. (It DOES let me delete them, but it asks me to confirm I want to delete the "write-protected" file, even though I was the user creating the file.) I tentatively have a functional setup using SAMBA and a mount -t smbfs, but my Samba permissions are likely a security hole. (I'm looking into it.) It's a little silly to use SAMBA to talk between two linux machines, but since the directory on the host machine needs to be accessible on our NT network, it's not completely crazy... I'd still be willingto hear (and score) any solid explanation for why it's not working with NFS...
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
Linux NFS permissions
I'm open to any ideas as how to to best make the NFS mount directory permissions as close to the same as a local dir as possible.
I'mexporting the dir in /etc/exports with:(rw,all_squash,anonuid=400,anongid=400)
When I try to delete files I create from a console, I'm told they're read only (but it lets me do it anyway?). The permissions appear to be 644 on files I create. Since I'm the owner (as my user or squashed to 400), why does it ask that? Is that problem why Oracle won't overwrite those files, or something more? More details available on request....