[SOLVED] Cannot mount NFS drive from Ubuntu

Discussion about using NAS on Linux and Unix OS.
transfire
Starting out
Posts: 22
Joined: Sat Sep 26, 2015 8:51 am

Re: [SOLVED] Cannot mount NFS drive from Ubuntu

Post by transfire » Wed Dec 02, 2015 3:32 am

Code: Select all

sudo apt-get install nfs-common

transfire
Starting out
Posts: 22
Joined: Sat Sep 26, 2015 8:51 am

Re: [SOLVED] Cannot mount NFS drive from Ubuntu

Post by transfire » Wed Dec 02, 2015 10:24 pm

So I've been able to mount a NAS folder using nfs and cifs. But only READ-ONLY. Under nfs is specifically tells me this. Under cifs I get a "Permission Denied" error. I set up my uid to be the same on both my desktop and my qnap, and I went in to the qnaps configuration to ensure read-write access was configured for the shares I want. And in the mount command I give `-o` username and password. No go. I have even tried giving `everyone` read/write access and setting "Guest Access Right" to "full access". Still the same thing. I don't know what else to do.

pierremillien
New here
Posts: 5
Joined: Tue Jan 12, 2010 12:30 am

Re: [SOLVED] Cannot mount NFS drive from Ubuntu

Post by pierremillien » Sun Jul 31, 2016 5:23 am

Hi All,

i think I'm gonna become crazy with this story :-) thank's for all the advice and tips you share. Unfortunately, no one worked for me.
A quick explication of my problem.

I have an old Raspberry PI (running raspbian) where I mount the /Qmultimedia folder of mw QNAP NAS.
my FSTAB look like this

Code: Select all

proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that
#//192.168.0.5/Qmultimedia /mnt/Video cifs guest,uid=1000,gid=1000,iocharset=utf8 0 0
//192.168.0.5/Qmultimedia /mnt/Video cifs rw,user,username=admin,password=balbla,uid=1000,gid=1000,iocharset=utf8 0 0


This is great, and work very well (thumbs UP)

My user "pi" looks like this:

Code: Select all

pi:x:1000:1000:,,,:/home/pi:/bin/bash


My NAS QNAP TS-219P II
has the same user with full RW access to /Qmultimedia
i created a user "pi" with the same UID GUID etc

Code: Select all

[/] # grep pi /etc/passwd 
pierre:x:500:100:Linux User,,,:/share/homes/pierre:/bin/sh
pi:x:1000:1000:Linux User,,,:/share/homes/pi:/bin/sh


Everything is really OK and great working with it.

But now i would like to migrate my old raspberry to a new one - THE new one :-)

So i created the same "pi" user with same rights and UID GID

Code: Select all

pi@raspberrypi:~ $ cat /etc/passwd | grep pi
pi:x:1000:1000:,,,:/home/pi:/bin/bash


I tried lots lots lots of things to bring this /Qmultimedia mounted on mw new raspberry, but nothing work as far...
I always have a Permission deny when I try to mount it.


Code: Select all

pi@raspberrypi:~ $ sudo mount -avvvvvvv
/proc                    : already mounted
/boot                    : already mounted
/                        : ignored
Password for root@//192.168.0.5/Qmultimedia:  ********
mount.cifs kernel mount options: ip=192.168.0.5,unc=\\192.168.0.5\Qmultimedia,noperm,user=root,pass=********
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


pi@raspberrypi:~ $ sudo mount -t cifs //192.168.0.5:/share/Qmultimedia /mnt/Video/
mount error: could not resolve address for 192.168.0.5:: Unknown error

pi@raspberrypi:~ $ sudo mount -t cifs //192.168.0.5/share/Qmultimedia /mnt/Video/
Password for root@//192.168.0.5/share/Qmultimedia:  ********
Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

pi@raspberrypi:~ $ sudo mount -t cifs //192.168.0.5/share/Qmultimedia /mnt/Video/ -o guest,noperm
Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

pi@raspberrypi:~ $ sudo mount -t cifs //192.168.0.5/Qmultimedia /mnt/Video/ -o guest,noperm
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

pi@raspberrypi:~ $ sudo mount -t cifs //192.168.0.5:/Qmultimedia /mnt/Video/ -o guest,noperm
mount error: could not resolve address for 192.168.0.5:: Unknown error

pi@raspberrypi:~ $ sudo mount -t cifs //192.168.0.5/Qmultimedia /mnt/Video/ -o guest,noperm
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


As you can see I try many different combinations of options, but no one work. I'm sure it's a little thing but now, after 5h trying to understand why this doesn't work, read many topics. I think I'm in a dead end. hihi

In advance, lots of thanks for your help and answers
Pierre

User avatar
schumaku
Guru
Posts: 43664
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: [SOLVED] Cannot mount NFS drive from Ubuntu

Post by schumaku » Tue Aug 02, 2016 1:54 am

pierremillien wrote:i think I'm gonna become crazy with this story
Same for me - almost convinced I gave a short reply on the very same query before.

Please:
- do not double post.
- stick with the topic (CIFS mount is not NFS mount).

BurningSky
Know my way around
Posts: 106
Joined: Wed Nov 07, 2012 8:33 pm

Re: [SOLVED] Cannot mount NFS drive from Ubuntu

Post by BurningSky » Thu Jun 22, 2017 5:27 pm

I'm having similar NFS issues. I am no Linux expert so would appreciate any thoughts...
I am using Ubuntu 16.04 with nfs-common installed. In the Qnap web client I have created a user with the same name as the account on the Ubuntu machine, Drone. Then I went to the NFS permissions of the Multimedia folder and set:

Code: Select all

Access right: No limit
Squash option: ROOT_SQUASH
UID: Drone
Host/IP: <IP of the Ubuntu client>


On the Ubuntu client I created /nfs/multimedia folder and set chown on both as the Drone:Drone (as there is a group for the user too). My fstab has:

Code: Select all

192.168.0.2:/Multimedia        /nfs/multimedia nfs rw,hard,intr,rsize=8192,wsize=8192,timeo=14 0 0


It mounts but I am not sure how the permissions are working. I can write a file as the Drone user in the root folder but not in the subfolders. I manually changed the Movies folder to 777 to see if that would help but I still can't seem to get permissions!

Code: Select all

burningsky@ubuntu:~$ ls -l /nfs/
total 8
drwxrwxrwx 20 root root 4096 Jun 22 10:21 multimedia
burningsky@ubuntu:~$ sudo -u Drone touch /nfs/multimedia/test.file
burningsky@ubuntu:~$ ls -l /nfs/multimedia/
total 224
drwxrwxrwx 796 root       root       36864 Jun 22 09:30 Movies
-rw-r-----   1 Drone   nogroup        0 Jun 22 10:22 test.file
burningsky@ubuntu:~$ sudo -u Drone touch /nfs/multimedia/Movies/test.file
touch: cannot touch '/nfs/multimedia/Movies/test.file': Permission denied


I am assuming it is probably something very simple I have missed but not knowing much about Linux I'm not sure what it is, any suggestions would be greatly appreciated. Do I need to change the owner of the folder on the Qnap site? sshed onto the Qnap it shows chown as admin:administrator, is that causing the issue?

BurningSky
Know my way around
Posts: 106
Joined: Wed Nov 07, 2012 8:33 pm

Re: [SOLVED] Cannot mount NFS drive from Ubuntu

Post by BurningSky » Thu Jun 22, 2017 5:45 pm

I just created a new folder on the Qnap;

Code: Select all

[/share/Multimedia] # mkdir test
[/share/Multimedia] # chmod 777 test
[/share/Multimedia] # ls -l
drwxrwxrwx    2 admin    administ      4096 Jun 22 10:28 test/


Then wrote to it from Ubuntu and it worked:

Code: Select all

burningsky@ubuntu:~$ sudo -u Drone touch /nfs/multimedia/test/test.file
burningsky@ubuntu:~$ ls -l /nfs/multimedia/test
total 0
-rw-r----- 1 Drone nogroup 0 Jun 22 10:28 test.file


I'm not sure what's different as the folders seem to have the same permissions?!

Code: Select all

burningsky@ubuntu:~$ ls -l /nfs/multimedia
total 232
drwxrwxrwx 796 root       root       36864 Jun 22 09:30 Movies
drwxrwxrwx   2 root       root        4096 Jun 22 10:28 test

Code: Select all

[/share/Multimedia] # ls -lh
drwxrwxrwx  796 admin    administ     36.0k Jun 22 09:30 Movies/
drwxrwxrwx    2 admin    administ      4.0k Jun 22 10:28 test/


Am I missing something?

EDIT: If I take the capital letter out of the folder name it seems to work... Is this standard in nfs?!
EDIT 2: If I then change the permissions on that folder writing stops working again but if I move it to a new name it starts working again... The whole just keeps getting deeper

Post Reply

Return to “Linux & Unix (NFS)”