Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems mounting NFS share
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
thj
n00b
n00b


Joined: 16 Jan 2004
Posts: 70
Location: Denmark

PostPosted: Mon Jan 19, 2004 5:22 pm    Post subject: Problems mounting NFS share Reply with quote

Hello..

I have a server where i want to share /var/www/localhost/htdocs to another gentoo linux machine. The user ether (a user on my workstation) should be able to edit files in htdocs from my workstation.
In /etc/exports i have:
Code:
/var/www/localhost/htdocs/ 192.168.0.2(rw,no_root_squash,anonuid=1000,anongid=100,sync)


And I'm mounting the share on my workstation, using:
Code:
# su
# mount 192.168.0.1:/var/www/localhost/htdocs htdocs/


Theres no problem edition the files when I'm logged in as root, but when I go back to use the user ether, i get perm. denided. What am i doing wrong, please help :)

Maybe youll need theese informations from my workstation:
Code:
# id ether
uid=1000(ether) gid=100(users) groups=100(users),10(wheel),18(audio),35(games),80(cdrw)


I'm out.
Back to top
View user's profile Send private message
shadow255
Guru
Guru


Joined: 04 Apr 2003
Posts: 412

PostPosted: Mon Jan 19, 2004 5:47 pm    Post subject: Re: Problems mounting NFS share Reply with quote

ether wrote:
Hello..

I have a server where i want to share /var/www/localhost/htdocs to another gentoo linux machine. The user ether (a user on my workstation) should be able to edit files in htdocs from my workstation.
In /etc/exports i have:
Code:
/var/www/localhost/htdocs/ 192.168.0.2(rw,no_root_squash,anonuid=1000,anongid=100,sync)


And I'm mounting the share on my workstation, using:
Code:
# su
# mount 192.168.0.1:/var/www/localhost/htdocs htdocs/


Theres no problem edition the files when I'm logged in as root, but when I go back to use the user ether, i get perm. denided. What am i doing wrong, please help :)

The reason this is no problem for root is that you have specified no_root_squash on the server; otherwise, you wouldn't be able to modify the files as root, either!
Quote:
Maybe youll need theese informations from my workstation:
Code:
# id ether
uid=1000(ether) gid=100(users) groups=100(users),10(wheel),18(audio),35(games),80(cdrw)


I'm out.

Does the UID of 1000 and GID of 100 exist on the server as well? Furthermore, do those user/group IDs have appropriate permissions for the directory you're exporting? If so, I would like to recommend a modification to your entry in /etc/exports as follows:
Code:
/var/www/localhost/htdocs/ 192.168.0.2(rw,all_squash,anonuid=1000,anongid=100,sync)

Of course, there are other ways to deal with the permissions that are possibly more secure, but as long as your LAN is well-controlled this should not pose a concern. If you have the user ether on both server and workstation with identical uid and gid, you could dispense entirely with the squashing and anonuid/anongid.

I hope this helps!
_________________
Vogon poetry is of course the third worst in the Universe. -- Douglas Adams, The Hitchhiker's Guide to the Galaxy
Back to top
View user's profile Send private message
thj
n00b
n00b


Joined: 16 Jan 2004
Posts: 70
Location: Denmark

PostPosted: Mon Jan 19, 2004 6:04 pm    Post subject: Reply with quote

It works now, thanks shadow255.[/code]
Back to top
View user's profile Send private message
groover
n00b
n00b


Joined: 04 Jan 2004
Posts: 38

PostPosted: Sat Apr 10, 2004 8:55 am    Post subject: NFS uid gid ugidd Reply with quote

Hello,

I have another problem to this...

My NFS runs 'fine', Debian Woody server, Gentoo x86 client stations. There's just the problem, that each client hat other uids and gids, so I need to map them correctly.
I have

/home/groover bo(rw,anonuid=1001,anongid=1001) bomile(rw,anonuid=1004,anongid=1004)

in /etc/exports, but when I export directories from the server, the uid/gid weren't mapped.
I still have the uid/gid as they are on the server, uid/gid = 500.
Of course my local user groover has no permissions to write to this export.

Everytime I read about anonuid/anongid in /etc/exports, I read that I have to run ugidd on the client side to get uid/gid mapping work.
In the gentoo package nfs-utils-1.0.6, which I have installed on the clients, there isn't something like /sbin/ugidd .

Perhaps you have an idea for me?

Thanks a lot,

groover
_________________
If I was you, I'd like to be me.
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