LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-14-2008, 11:38 AM   #1
djsting
LQ Newbie
 
Registered: Jun 2008
Posts: 16

Rep: Reputation: 0
Troubles with NFS Share being Accessible via Apache and the Web


I have two Linux systems. On one I have a few NFS exports and on the other I'm mounting those NFS exports. All exports are configured the same way and mounted the same way. The issue I have is that on one of them (yes, ONLY ONE) the owner of the directory changes after it has been mounted. For example, I crated a directory called Z-Car_Stuff and it's owned by root (this is located in my Apache directory structure as the files will be served up to the web); after I mount the NFS share the owner of the Z-Car_Stuff directory changes to another user on that system. WHY!? How do I fix this so that it does not change?

Here are the lines from the fstab:

Code:
warehouse2:/mp3		/mp3s	nfs	rsize=8192,wsize=8192,timeo=14	0	0
warehouse2:/data/Z-Stuff		/www/pape/allan_and_rosanne/Z-Car_Stuff	nfs	rsize=8192,wsize=8192,timeo=14	0	0
warehouse2:/data/guardian/notesdata/NoLimitsREI/BirdDog /local/notesdata/NoLimitsREI/BirdDog nfs rsize=8192,wsize=8192,timeo=14 0 0
Here's the ll output before mounting:
Code:
[root@guardian allan_and_rosanne]# ll
total 20
drwxr-xr-x 2 root root 4096 Feb 11 18:03 mp3
drwxr-xr-x 3 root root 4096 Jan 26 16:59 OLD
drwxr-xr-x 2 root root 4096 Jan 26 16:59 ourhouse
drwxr-xr-x 3 root root 4096 Jan 26 16:59 wedding
drwxr-xr-x 2 root root 4096 May 18 20:20 Z-Car_Stuff
[root@guardian allan_and_rosanne]#
And after mounting:
Code:
[root@guardian allan_and_rosanne]# ll
total 24
drwxr-xr-x   2 root  root  4096 Feb 11 18:03 mp3
drwxr-xr-x   3 root  root  4096 Jan 26 16:59 OLD
drwxr-xr-x   2 root  root  4096 Jan 26 16:59 ourhouse
drwxr-xr-x   3 root  root  4096 Jan 26 16:59 wedding
drwxr-xr-x 149 apape apape 4096 Sep 11  2006 Z-Car_Stuff
[root@guardian allan_and_rosanne]#
Here's the exports file content:
Code:
[root@warehouse etc]# cat exports
/mp3 guardian2(ro) guardian(ro)
/data/Z-Stuff guardian2(ro) guardian(ro)
/data/Install guardian2(ro) guardian(ro)
/rosanne playground(ro)
/data playground(ro)
/mp3 playground(ro)
/data/guardian/notesdata/NoLimitsREI/BirdDog guardian2(rw)
 
[root@warehouse etc]#
Please help me resolve this...
 
Old 06-17-2008, 09:02 AM   #2
erik258
LQ Newbie
 
Registered: Jan 2006
Location: Twin Cities, Minnesota, USA
Distribution: Gentoo
Posts: 5

Rep: Reputation: 0
The user ID of the owner on the server corresponds with a different username on the client. Change one or the other, but note this might effect other ownerships elsewhere.
 
Old 06-17-2008, 07:48 PM   #3
djsting
LQ Newbie
 
Registered: Jun 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Output of an ls -n command before mounting:
Code:
[root@guardian allan_and_rosanne]# ls -n
total 20
drwxr-xr-x 2 0 0 4096 Feb 11 18:03 mp3
drwxr-xr-x 3 0 0 4096 Jan 26 16:59 OLD
drwxr-xr-x 2 0 0 4096 Jan 26 16:59 ourhouse
drwxr-xr-x 3 0 0 4096 Jan 26 16:59 wedding
drwxr-xr-x 2 0 0 4096 May 18 20:20 Z-Car_Stuff
[root@guardian allan_and_rosanne]#
And after:
Code:
[root@guardian allan_and_rosanne]# ls -n
total 24
drwxr-xr-x   2   0   0 4096 Feb 11 18:03 mp3
drwxr-xr-x   3   0   0 4096 Jan 26 16:59 OLD
drwxr-xr-x   2   0   0 4096 Jan 26 16:59 ourhouse
drwxr-xr-x   3   0   0 4096 Jan 26 16:59 wedding
drwxr-xr-x 149 500 500 4096 Sep 11  2006 Z-Car_Stuff
[root@guardian allan_and_rosanne]#
As you may conclude from this and my original post, on the client root is UID 0 and GID 0 and apape is UID 500 and GID 500.

On the NFS server the UID and GID are the same for both users (root and apape), in fact all UID and GID values are in sync between the two systems.

Further, here is what groups apape is a member of:
Code:
[root@guardian allan_and_rosanne]# su apape
[apape@guardian allan_and_rosanne]$ id
uid=500(apape) gid=500(apape) groups=0(root),48(apache),500(apape),501(notes)
[apape@guardian allan_and_rosanne]$
And here's what groups apache is a member of:
Code:
[root@guardian allan_and_rosanne]# id apache
uid=48(apache) gid=48(apache) groups=48(apache),500(apape),501(notes)
[root@guardian allan_and_rosanne]#
Additionally, on the NFS server the above group memberships are the same.

On the NFS server the info on the two exports are as follows:
Code:
drwxr-xr-x 467 apape  apape  20480 Jun 12 20:47 mp3
Code:
drwxr-xr-x 467 500 500 20480 Jun 12 20:47 mp3
and:
Code:
drwxr-xr-x 149 apape apape     4096 Sep 11  2006 Z-Stuff
Code:
drwxr-xr-x 149 500 500     4096 Sep 11  2006 Z-Stuff
So as you can see the two exports are the same as one another yet when mounted on the client they are behaving differently. ???

Is there something else that I'm missing here?

Last edited by djsting; 06-17-2008 at 08:00 PM.
 
Old 06-29-2008, 04:00 PM   #4
djsting
LQ Newbie
 
Registered: Jun 2008
Posts: 16

Original Poster
Rep: Reputation: 0
I finally figured this out!!! I was an Apache config issue all along...I had to add the following lines to the appropriate VirtualHost on my system and all is good!

Code:
<Directory /www/pape/allan_and_rosanne/Z-Car_Stuff>
    Options Indexes FollowSymLinks
</Directory>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
samba share visible not accessible vinod Linux - Security 2 02-04-2007 11:05 AM
Samba share is not accessible tanveer Linux - Software 2 09-25-2006 02:51 PM
Troubles with Web Serving (Apache 2.0.50) peruvianllama Linux - Networking 2 11-09-2004 12:56 AM
Apache - default *.pl or *.cgi scripts on NFS share pdhami Linux - Enterprise 0 05-17-2004 11:34 AM
Samba share not accessible Quercus Linux - Software 2 12-07-2003 08:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:21 AM.

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