LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   trying to mount a new directory but got access denied. (https://www.linuxquestions.org/questions/linux-newbie-8/trying-to-mount-a-new-directory-but-got-access-denied-4175563892/)

ahse0w 01-13-2016 10:03 PM

trying to mount a new directory but got access denied.
 
I have a server running and i have some printers that are using the server to mount.
recently, i have setup a rsync script to sync data from another server so that all my data resides on my own server.
but i have problem mounting to the new folder i have created to store the sync data, it keeps saying permission denied when i try to mount.

excerpt from my fstab:

16.155.12.10:/sync/data /data nfs nfsvers=2,rsize=8192,timeo=15,intr

16.155.12.10:/gate /gate nfs nfsvers=2,rsize=8192,timeo=15,intr

the first line gives the permission denied error.
the 2nd line works fine.
i have done chmod -R 777 on /sync already but it doesnt help.

any advice? thanks!

berndbausch 01-13-2016 11:32 PM

What's the distro you are using on the NFS client?
Why are you using NFS version 2 instead of the current 4 (this question is probably not relevant to your problem, but I am curious:) ?

Can you run the following manually, as root:
Code:

mount -t nfs -o nfsvers=2,rsize=8192,timeo=15,intr 16.155.12.10:/sync/data /data
and report the result?

Also check what the server exports to you:
Code:

showmount -e 16.155.12.10
And if you can, on the server:
Code:

showmount -e
cat /etc/exports

Finally, could the error be related to the local mount point /data?

ahse0w 01-14-2016 03:22 AM

i found the solution after searching the web. i didn't edit the /etc/exports list after i created the folder for mounting.
after i added in the line in the export list, i can mount with no issues.

Code:

/sync *(async,rw,no_root_squash)
i am not sure what distro the client is using, but it seems to be Wind River Linux?
as for why it is using NFS version 2 i have no idea as well. The client is not an usual computer, but it is a plotter. So i guess it can accept only version 2...


All times are GMT -5. The time now is 04:31 PM.