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 12-31-2015, 12:27 PM   #1
meki
LQ Newbie
 
Registered: Dec 2015
Posts: 6

Rep: Reputation: Disabled
Question Cannot mount NFS share (Fstab special character at the end of the mount)


Hi,

Hopefully this is the right place to ask this.
I have read and read everywhere about this issue and cannot figure it out.

I am trying to mount an exported mount

Code:
sudo showmount -e 192.168.1.173
Export list for 192.168.1.173:
/mnt/user/Documentaries (TV)    192.168.1.38
/mnt/user/Documentaries (Movie) 192.168.1.38
In my fstab I put
Code:
192.168.1.173:/mnt/user/Documentaries\040\050TV\051 /mnt/Documentaries_TV       nfs     noatime,vers=3,auto,rw,dev,exec,suid,rsize=32768,wsize=32768 0 0
But it wont mount
when I do
Code:
mount -a
I get this
Code:
sudo mount -a
mount.nfs: access denied by server while mounting 192.168.1.173:/mnt/user/Documentaries (TV\051
If I put another character after \051 then the next character is detected
Code:
sudo mount -a
mount.nfs: access denied by server while mounting 192.168.1.173:/mnt/user/Documentaries (TV)test
It seems that the last character is not parsed.

I am really lost here I am hoping someone can help
 
Old 01-06-2016, 11:38 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 12,984

Rep: Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094
I would definitely try to use another name, without ( and ).
I cannot see if you have space or tab after \051, I would also try to add more tabs/spaces, probably that will work too.
finally I would try to use ( and ) directly, only space will remain as \040
 
Old 01-06-2016, 11:41 AM   #3
meki
LQ Newbie
 
Registered: Dec 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
I tried both spaces and tabs.

In the end I changed the names of mounts.

I went as far as adding a "/" at the end of mount name then I was able to mount it using "mount -a" but it would still not mount at boot.
 
Old 01-06-2016, 01:22 PM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 12,984

Rep: Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094
I checked and it looks like it is connected to the c function getmntent but still could not find how it handles those special characters.
Code:
#include <stdio.h>
#include <mntent.h>

void main() {
   FILE *f;
   char *name = "/etc/fstab";

   f = fopen(name, "r");
   if ( f == NULL ) {
       perror("cannot open file");
   }

   struct mntent *m = getmntent(f);

   printf("fsname=%s, dir=%s\n", m->mnt_fsname, m->mnt_dir);
   m = getmntent(f);
   printf("fsname=%s, dir=%s\n", m->mnt_fsname, m->mnt_dir);
   endmntent(f);
// repeat as long as you want
}
and I have no idea how it works on your system.
 
  


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
Cannot mount NFS share (Fstab special character at the end of the mount) meki Linux - Newbie 3 01-01-2016 10:19 AM
fstab entry does not mount nfs share nanbudh Linux - Networking 13 06-07-2012 02:05 PM
Can't mount nfs share from fstab but can mount it manually - help Mountain Linux - Networking 1 03-30-2008 08:34 PM

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

All times are GMT -5. The time now is 11:43 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