?
Solved

linux Mount - permission denied

Posted on 2009-02-12
8
Medium Priority
?
2,683 Views
Last Modified: 2013-12-16
I get the following error message when I attempt to mount servermountb "mount -t nfs servermountb:/var/log/httpd testdir" from serverclient.  I am able to mount servermounta without any problems.  I just can't seem to figure out what the problem is.  Both server are the exact duplicate.  Here are the details.

#servermounta & servermountb
Within the /etc/exports,
     /var/log/httpd

Within the /etc/hosts.allow
NONE

Within the /etc/hosts.deny
NONE

Within the hosts file of servermounta & servermountb
     127.0.0.1 localhost.localdomain localhost

rpcinfo -p shows the following information
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100011    1   udp   1009  rquotad
    100011    2   udp   1009  rquotad
    100011    1   tcp   1012  rquotad
    100011    2   tcp   1012  rquotad
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100021    1   udp  32771  nlockmgr
    100021    3   udp  32771  nlockmgr
    100021    4   udp  32771  nlockmgr
    100021    1   tcp  33220  nlockmgr
    100021    3   tcp  33220  nlockmgr
    100021    4   tcp  33220  nlockmgr
    100005    1   udp    601  mountd
    100005    1   tcp    604  mountd
    100005    2   udp    601  mountd
    100005    2   tcp    604  mountd
    100005    3   udp    601  mountd
    100005    3   tcp    604  mountd
    100024    1   udp    646  status
    100024    1   tcp    649  status


After all the configuration, I typed 'exportfs -ra', restart the nfs service, restart the nfslock service, restart the portmap service.

On serverclient, I typed mount -t nfs servermountb:/var/log/httpd testdir, I get 'mount: servermountb:/var/log/httpd failed, reason given by server: Permission denied'.  If I try it on servermounta, it mount without any problems.

servermounta /var/log/messages detailed successful authentication
"Feb 12 16:00 servermounta mountd[775]: authenticated mount request from 192.168.0.10:891 for /var/log/httpd testdir2.

servermountb shows the same information in /var/log/messages when I attempt a mount.
"Feb 12 16:02 servermountb mountd[775]: authenticated mount request from 192.168.0.10:891 for /var/log/httpd testdir1.

ping servermounta and servermountb hostname responded with the correct ip address.

suggestions?
0
Comment
Question by:tastas
  • 4
  • 4
8 Comments
 
LVL 4

Expert Comment

by:AdamsConsulting
ID: 23628545
Can we get the results of an ls -al on /var/log/httpd on both servers?
0
 
LVL 5

Author Comment

by:tastas
ID: 23628919
Here is the result of the ls -al
drwx------  2 root root     4096 Feb  8 04:02 .
drwxr-xr-x 12 root root     4096 Feb  9 11:41 ..
-rw-r--r--  1 root root  5160770 Feb 12 17:36 access_log
-rw-r--r--  1 root root 20917700 Feb  8 04:00 access_log.1
-rw-r--r--  1 root root 47633141 Feb  1 04:02 access_log.2
-rw-r--r--  1 root root 18520790 Jan 25 04:00 access_log.3
-rw-r--r--  1 root root 15060233 Jan 17 19:40 access_log.4
-rw-r--r--  1 root root      240 Feb  8 04:02 error_log
-rw-r--r--  1 root root     3130 Feb  8 04:02 error_log.1
-rw-r--r--  1 root root    26715 Feb  1 04:02 error_log.2
-rw-r--r--  1 root root      316 Jan 25 04:02 error_log.3
-rw-r--r--  1 root root    60687 Jan 18 04:02 error_log.4

Note:  The password of root is the same on the serverclient, servermounta, servermountb.  Hosts key have been setup.  It is mounting using the root account as well.
0
 
LVL 4

Expert Comment

by:AdamsConsulting
ID: 23629307
Sorry, I needed the output of the ls -al for both servers. I suspect something is different in the results.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Author Comment

by:tastas
ID: 23636286
The servermountb shows the same file with the same permission
-rw-r--r-- on error log and access logs
drwx------  2 root root 4096 Nov 15 00:54 .
drwxr-xr-x  9 root root 4096 Feb  8 04:02 ..

0
 
LVL 4

Expert Comment

by:AdamsConsulting
ID: 23636475
Try looking in /var/log/secure on the server b. Most permissions issues should be logged. The log may say why the permission was denied.
0
 
LVL 5

Author Comment

by:tastas
ID: 23637311
noted in the initial question:  It showed that it was successfully authenticated.

servermountb shows the same information in /var/log/messages when I attempt a mount.
"Feb 12 16:02 servermountb mountd[775]: authenticated mount request from 192.168.0.10:891 for /var/log/httpd testdir1.

That's the strange part.  It shows authenticated in the servermountb log; yet it display permission denied in the serverclient.
0
 
LVL 4

Accepted Solution

by:
AdamsConsulting earned 1500 total points
ID: 23638817
Sorry, I hadn't realized that was from /var/log/secure, as you said it was from /var/log/messages.

I think you have me thoroughly confused. Why would:

mount -t nfs servermountb:/var/log/httpd testdir

result in this being in the logs on the remote server:

Feb 12 16:02 servermountb mountd[775]: authenticated mount request from 192.168.0.10:891 for /var/log/httpd testdir1

Was this supposed to be?

mount -t nfs servermountb:/var/log/httpd testdir1

Can you show me the results of ls -l from the directory where you're running the command? Have you tried mounting them at opposite mountpoints?

mount -t nfs servermountb:/var/log/httpd testdir2
0
 
LVL 5

Author Closing Comment

by:tastas
ID: 31546354
The linux server was being like Windows.  Even though system was rebooted.  It didnt work.  I had to rebooted it twice and it finally worked.  Awarding you points since you helped.  
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses
Course of the Month13 days, 20 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question