LinuxQuestions.org
Help answer threads with 0 replies.
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 11-26-2007, 03:35 AM   #1
yusufs
Member
 
Registered: Oct 2007
Posts: 162

Rep: Reputation: 30
NFS - Permission Denied Error


Hai all,

I tried mounting a drive on the remote server and it is mounted and when am trying to create any directory in the mounted drive : am
getting the following error :


Client machine :
******************
[root@test ]# mkdir tes1
mkdir: cannot create directory `tes1': Permission denied


server :
*********
[root@oracle oracle]# cat /etc/exports

/d03 test.sud.com.kw(rw)
/d02 test.sud.com.kw(rw)
/d05 test.sud.com.kw(rw)

where /d05 is the drive which was mounted on the client test.


******************************************************
[root@oracle oracle]# cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
LABEL=/stage /stage ext3 defaults 1 2
none /sys sysfs defaults 0 0
LABEL=SW-cciss/c0d0p3 swap swap defaults 0 0
/dev/sda5 /d01 ext3 defaults 0 0
/dev/sda6 /d02 ext3 defaults 0 0
/dev/sda7 /d03 ext3 defaults 0 0
/dev/sdb /d04 ext3 defaults 0 0
/dev/sdc1 /d05 ext3 defaults 0 0
/dev/hda /media/cdrom auto pamconsole,fscontext=system_ubject_r:removable_t,exec,noauto,managed 0 0
*****************************************************************
where /d05 is the drive mounted on the client..

etc/fstab in the client
***********************
root@test ]# cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/1 / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
LABEL=/stage1 /stage ext3 defaults 1 2
none /sys sysfs defaults 0 0
LABEL=SW-cciss/c0d0p3 swap swap defaults 0 0
/dev/sda5 /d01 ext3 defaults 0 0
/dev/sda6 /d02 ext3 defaults 0 0
/dev/sda7 /d03 ext3 defaults 0 0
oracle:/d05 /d08 nfs defaults 0 0oracle:/d02 /oracle nfs defaults 0 0

/dev/hdb /media/cdrecorder auto pamconsole,fscontext=system_ubject_r:removable_t,exec,noauto,managed 0 0

*********************************************************************
where /d08 is the drive am mouting in the client machine..

Please help

Yusuf
 
Old 11-26-2007, 03:52 AM   #2
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 288

Rep: Reputation: 31
The 1st place I would look is /var/log/messages and see what is being reported.
 
Old 11-26-2007, 04:35 AM   #3
yusufs
Member
 
Registered: Oct 2007
Posts: 162

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by james.farrow View Post
The 1st place I would look is /var/log/messages and see what is being reported.

Hai james,

I coul'd nt find any informative messages there ,, if u can please let me know..

file follows :


[root@alioracle oracle]# cat /var/log/messages
Nov 25 04:02:07 alioracle syslogd 1.4.1: restart.
Nov 25 04:02:07 alioracle kernel: audit(1195952527.972:10): avc: denied { write } for pid=3947 comm="syslogd" name="logs" dev=cciss/c0d0p1 ino=848644 scontext=user_u:system_r:syslogd_t tcontext=user_ubject_r:root_t tclass=dir
Nov 25 04:02:07 alioracle kernel: audit(1195952527.972:11): avc: denied { write } for pid=3947 comm="syslogd" name="logs" dev=cciss/c0d0p1 ino=848644 scontext=user_u:system_r:syslogd_t tcontext=user_ubject_r:root_t tclass=dir
Nov 25 08:50:31 alioracle sshd(pam_unix)[15446]: session opened for user oraprod by (uid=0)
Nov 25 09:31:13 alioracle remote(pam_unix)[19273]: session opened for user support by (uid=0)
Nov 25 09:31:13 alioracle -- support[19273]: LOGIN ON pts/3 BY support FROM 10.0.60.105
Nov 25 09:31:21 alioracle su(pam_unix)[19310]: session opened for user root by support(uid=500)
Nov 25 10:25:26 alioracle remote(pam_unix)[19273]: session closed for user support
Nov 25 10:25:26 alioracle su(pam_unix)[19310]: session closed for user root
Nov 25 15:53:12 alioracle sshd(pam_unix)[15446]: session closed for user oraprod
Nov 26 08:54:04 alioracle sshd(pam_unix)[17291]: session opened for user oraprod by (uid=0)
Nov 26 10:00:05 alioracle sshd(pam_unix)[23585]: session opened for user root by root(uid=0)
[root@alioracle oracle]#
 
Old 11-26-2007, 05:31 AM   #4
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 288

Rep: Reputation: 31
Usually when you mount a exported nfs directory on the client machine, the nfs server will have a system message saying mount authenticated from client.example.com: or something similar.
On the sever, I would create a mount point and type showmount -e nfsserver.example.com ( or whatever it is) and see if you can mount the nfs export on the nfs server 1st, and check messages for authentication. Then try the same from the client and check messages on both machines.
mount -t nfs server.example.com:/nfsexport /mnt/nfs

Give the above a go.
 
Old 11-26-2007, 05:57 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
What are the properties of the directory you are sharing?
 
Old 11-26-2007, 06:19 AM   #6
zoranp
Member
 
Registered: Nov 2007
Location: Belgrade, RS
Distribution: Mandriva 2009.0 X86_64
Posts: 44

Rep: Reputation: 15
Do not forget that local user root is user nobody on mounted nfs filesystem.

If you feel that you need to be root on nfs mounted filesystem try "no_squash_root" in /etc/exports.
 
Old 11-26-2007, 06:38 AM   #7
yusufs
Member
 
Registered: Oct 2007
Posts: 162

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by james.farrow View Post
Usually when you mount a exported nfs directory on the client machine, the nfs server will have a system message saying mount authenticated from client.example.com: or something similar.
On the sever, I would create a mount point and type showmount -e nfsserver.example.com ( or whatever it is) and see if you can mount the nfs export on the nfs server 1st, and check messages for authentication. Then try the same from the client and check messages on both machines.
mount -t nfs server.example.com:/nfsexport /mnt/nfs

Give the above a go.
Thanks James,

but the same error ,

I unmounted it and mounted again :

when I mount the file like :

[root@alioracle ~]# mount -t nfs oracle:/d05 /d08
[root@alioracle ~]#

it does'nt give any message. it went silent..


server
*******
[root@oracle ~]# showmount -e
Export list for oracle.ali.com.kw:
/d05 alioracle.ali.com.kw
/d02 alioracle.ali.com.kw
/d03 alioracle.ali.com.kw


[root@oracle ~]# exportfs -rvexportfs: /etc/exports [2]: No 'sync' or 'async' option specified for export "alioracle.ali.com.kw:/d03".
Assuming default behaviour ('sync').
NOTE: this default has changed from previous versions
exportfs: /etc/exports [3]: No 'sync' or 'async' option specified for export "alioracle.ali.com.kw:/d02".
Assuming default behaviour ('sync').
NOTE: this default has changed from previous versions
exportfs: /etc/exports [4]: No 'sync' or 'async' option specified for export "alioracle.ali.com.kw:/d05".
Assuming default behaviour ('sync').
NOTE: this default has changed from previous versions
exporting alioracle.ali.com.kw:/d05
exporting alioracle.ali.com.kw:/d02
exporting alioracle.ali.com.kw:/d03


i tried restarting NFS at both the nodes. but still,

Please guide
Yusuf
 
  


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
nfs 'permission denied' friendly_guy Slackware 7 01-02-2005 08:24 PM
PLEASE help, NFS (permission denied) Nappa Slackware 15 01-13-2004 08:17 PM
NFS permission denied somesh Linux - Software 2 07-22-2003 03:42 PM
NFS - Permission Denied... 15788 Linux - Networking 9 04-06-2003 10:43 AM
Permission Denied NFS graystarr Linux - Networking 9 07-08-2002 06:06 PM

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

All times are GMT -5. The time now is 09:56 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration