Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nfs mount with write permissions?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Utoxin
Guru
Guru


Joined: 19 Apr 2002
Posts: 413
Location: American Fork, UT

PostPosted: Sat Apr 20, 2002 4:42 pm    Post subject: nfs mount with write permissions? Reply with quote

How do I set up an nfs mount so that a non-root user can have rw access to it?

Here's my current /etc/fstab for the client, and /etc/exports for the server.

Code:

# /etc/fstab: static file system information.
#
# noatime turns of atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail and tail freely.

# <fs>             <mountpoint>    <type>     <opts>            <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hda2         /boot      ext2      noauto,noatime      1 1
/dev/hda4         /      xfs      noatime         0 0
/dev/hda3         none      swap      sw         0 0
/dev/cdroms/cdrom0      /mnt/cdrom   iso9660      noauto,ro,user      0 0
proc            /proc      proc      defaults      0 0
/dev/hdb2         /mnt/shared   vfat      defaults      0 0
fake-address.com:/var/www   /mnt/web-devel   nfs      rsize=8192,wsize=8192,timeo=14,intr,user

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink). Adding the following
# line to /etc/fstab should take care of this:
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will use almost no
#  memory if not populated with files)

tmpfs         /dev/shm   tmpfs      defaults      0 0

Code:

/var/www   host.fake-address.com(rw)
Back to top
View user's profile Send private message
Utoxin
Guru
Guru


Joined: 19 Apr 2002
Posts: 413
Location: American Fork, UT

PostPosted: Sat Apr 20, 2002 4:53 pm    Post subject: Reply with quote

Just a note, I tried changing my /etc/exports to this, based on the man pages, and it didn't change anything.
Code:

/var/www   host.fake-address.com(rw,all_squash,anonuid=500,anongid=500)
Back to top
View user's profile Send private message
squanto
Guru
Guru


Joined: 20 Apr 2002
Posts: 524
Location: Rochester, NY, USA

PostPosted: Sun Apr 21, 2002 12:36 am    Post subject: rw tag Reply with quote

you need the rw tag along with the rsize and wsize section
see if that helps ya out.

Andrew
Back to top
View user's profile Send private message
Utoxin
Guru
Guru


Joined: 19 Apr 2002
Posts: 413
Location: American Fork, UT

PostPosted: Sun Apr 21, 2002 2:37 am    Post subject: Reply with quote

Nope. No change.
Back to top
View user's profile Send private message
squanto
Guru
Guru


Joined: 20 Apr 2002
Posts: 524
Location: Rochester, NY, USA

PostPosted: Sun Apr 21, 2002 4:10 am    Post subject: does it mount? Reply with quote

on boot, does the nfs files system mount on your client?
and can you get into and look around the mounted file system as root?
can you atleast see how big the mounted file system is? if so, then it is mounting correctly, it is just not set up right.
if so, it is just probably a user permissions deal. Check the owner and permissions, just make a new group and add root and the users that will be able to access this to the group and make the directory that the nfs is mounted under be owned by this new group.

Does that help at all?
also check out : http://www.tldp.org/HOWTO/NFS-HOWTO/server.html
that is where I figured out most of the stuff for my nfs, but also from my other post on gentoo board.
Back to top
View user's profile Send private message
Utoxin
Guru
Guru


Joined: 19 Apr 2002
Posts: 413
Location: American Fork, UT

PostPosted: Sun Apr 21, 2002 10:33 pm    Post subject: Reply with quote

It is mounting. It's just mounting read only. Even though 'cat /proc/mounts' shows it as being mounted rw.

And changing the group permissions on the directory had no effect. In fact, it reset them when I did the mount.
Back to top
View user's profile Send private message
squanto
Guru
Guru


Joined: 20 Apr 2002
Posts: 524
Location: Rochester, NY, USA

PostPosted: Mon Apr 22, 2002 12:22 am    Post subject: on server Reply with quote

do the users that are trying to access the mounted directory have rw permissions on the server?
if they do, then I am kind of stumped. I don't have all that much experience with nfs, just what I know from getting my little one user setup going which was pretty painless.
If you are running Xwindows, you may want to look into menuconfig, you can configure most anything on your server with it fairly painlessly.
Back to top
View user's profile Send private message
Utoxin
Guru
Guru


Joined: 19 Apr 2002
Posts: 413
Location: American Fork, UT

PostPosted: Tue Apr 23, 2002 10:55 am    Post subject: Reply with quote

Where would I get info about 'menuconfig'?
Back to top
View user's profile Send private message
squanto
Guru
Guru


Joined: 20 Apr 2002
Posts: 524
Location: Rochester, NY, USA

PostPosted: Tue Apr 23, 2002 10:38 pm    Post subject: oops Reply with quote

I am an idoit, it isn't called menuconfig, that is for kernel, I have been doing too much work for school and not enough sleep.
The thing I ment to tell you about is webmin.

Info about it can be found here :
http://www.webmin.com/webmin/

It is pretty cool, it will run a web server on port 10000 if I remember correctly and you have to have apache installed. But other than that, I think it is pretty straight forward.

Sorry bout getting the names wrong.

-Andrew
Back to top
View user's profile Send private message
Utoxin
Guru
Guru


Joined: 19 Apr 2002
Posts: 413
Location: American Fork, UT

PostPosted: Fri May 03, 2002 10:26 am    Post subject: Reply with quote

Oops. Never got back to this. I did get it fixed. Turns out you /have/ to have the same UID on both machines. User /name/ doesn't matter. Once I did that, it worked great.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum