LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-15-2007, 12:45 AM   #1
IMNOboist
Member
 
Registered: Nov 2003
Location: Seattle
Distribution: OpenBSD, Ubuntu
Posts: 60

Rep: Reputation: 16
Mounting NFS share in Ubuntu always creates read-only


I'm trying to mount an NFS share that stored on a Fedora machine to an Ubuntu machine. In my Fedora machine, I have the /etc/exports file setup as:
Code:
/var/www/html 192.168.0.0/255.255.255.0(rw)
I run this command on the Ubuntu machine (as root):
Code:
mount -t nfs 192.168.0.3:/var/www/html /mnt/html
I can read the files just fine, but it won't let me have any write privileges. I think it has something to do with the permissions. The user:group is 500:500 and the permissions are all over the place.

How can I mount this share so that all of the non-root users on my Ubuntu machine can have read/write access? Doing it in the /etc/fstab would be preferred.

Thanks in advance!
 
Old 09-15-2007, 02:06 AM   #2
neonleonb
LQ Newbie
 
Registered: Nov 2006
Posts: 3

Rep: Reputation: 0
Bad UIDs?

It sounds like your user IDs don't line up. That is, if you type 'ls -l' and see user IDs like '500', then that means your Ubuntu machine has no user with that ID #. So, create a user with that ID # on the Ubuntu machine, and they will own those files. You can see the UIDs that correspond to usernames in the file '/etc/passwd'.

The same goes for the GID of 500.
 
Old 09-16-2007, 07:52 PM   #3
IMNOboist
Member
 
Registered: Nov 2003
Location: Seattle
Distribution: OpenBSD, Ubuntu
Posts: 60

Original Poster
Rep: Reputation: 16
Um... Would there be any way to make it so the files and folders would be setup under a UID and GID that I specify? I tried the f_mask and d_mask things but they aren't compatible with NFS.
 
Old 09-16-2007, 11:55 PM   #4
neonleonb
LQ Newbie
 
Registered: Nov 2006
Posts: 3

Rep: Reputation: 0
Short answer: not that I know of.... Hmm. On further seraching, there's a program called 'ugidd' that seems to do exactly what you want. It's available in the package manager on Ubuntu Feisty.

The answer I typed before finding out about ugidd:

Well, you can create new users with specified UIDs on either system, or you could change the UIDs of users on either system (by editing /etc/passwd). Bear in mind, if you change the UID of a user, you have to change the ownership of all their files; otherwise, they keep the old UID. There may be scripts you can find to do this automatically. Or maybe even a GUI; I don't know.

Perhaps the easiest solution is to create a group with the same GID on both systems, then change the group of all those files. And, to make sure any new files have that group, set the group sticky bit (chmod g+t) on the directory.
 
  


Reply

Tags
nfs



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS share not mounting with read/write permissions syphoncode.32 Linux - Software 1 06-15-2007 02:46 AM
NFS share is only mounted read-only? Poetics Linux - Networking 2 05-30-2007 12:58 PM
mounting nfs share jon23d Slackware 4 06-25-2006 03:19 AM
Mounting windows xp file system, creates mnt point, however, cant read files in share cmd0a0 Linux - Networking 10 04-16-2005 12:28 AM
nfs share is not mounting automatically pawlub Linux - General 1 01-03-2004 06:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration