User avatar
scootergarrett
Posts: 47
Joined: Sat Apr 19, 2014 2:36 pm

Mounting shared network folder with mount R/W access

Sat Jun 30, 2018 1:04 am

I have a raspberry pi set up sharing a network folder using samba. I can access files via my (Linux) lap top and used to access from other pi's via the mount command. I got the new Pi 3B+ and had to update Jessie, now when I mount the folder I only have read access. I doubt its the pi with the shared folder as other computes can read/ wtite as expected, did the Jessie update change something with mounting network folders and permisions that I need to account for?

Thanks

User avatar
lmarmisa
Posts: 1233
Joined: Thu Feb 14, 2013 2:22 am
Location: Jávea, Spain

Re: Mounting shared network folder with mount R/W access

Sat Jun 30, 2018 6:43 am

Maybe the problem is related to the mount command. You could need to define additional options like uid, gid, fmask or dmask. Could you post here your command?.

According to your comments your shared network is composed only of linux computers. Therefore you do not need to use samba. You could use directly the ssh/sftp file transfer protocol and the client sshfs. You do not need to configure anything on the server side in this case.

https://www.raspberrypi.org/documentati ... h/sshfs.md

Code: Select all

mkdir remote #mount point
sshfs pi@piserver:/home/pi remote #mount
fusermount -u remote #umount
I recommend to define RSA ssh keys for achieving remote passwordless access:

https://www.raspberrypi.org/documentati ... ordless.md

User avatar
rpdom
Posts: 15606
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Mounting shared network folder with mount R/W access

Sat Jun 30, 2018 7:13 am

lmarmisa wrote:
Sat Jun 30, 2018 6:43 am
You could use directly the ssh/sftp file transfer protocol and the client sshfs.
I prefer NFS. You only need to configure the server once and then add as many clients as you want.
You do not need to configure anything on the server side in this case.
True, apart from the ssh keys.

User avatar
scootergarrett
Posts: 47
Joined: Sat Apr 19, 2014 2:36 pm

Re: Mounting shared network folder with mount R/W access

Sat Jun 30, 2018 11:12 am

The mount command I'm using is:

Code: Select all

sudo mount.cifs //<IP>/public /home/pi/Shared/ -o user=pi,password=<PW>
where <IP> is the IP address of the server pi, and <PW> is the samba password.
In the future I may want to use a windows computer. but for my understanding the sshfs would act just like a networked folder with multiple pies using just a local network connection?

Thanks again

epoch1970
Posts: 3888
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Mounting shared network folder with mount R/W access

Sat Jun 30, 2018 11:36 am

There is something going on with CIFS protocol version. Not sure if this is relevant, but you could try adding "vers=1.0" to your options.
viewtopic.php?p=200456#p1290795
viewtopic.php?p=1298913
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

User avatar
scootergarrett
Posts: 47
Joined: Sat Apr 19, 2014 2:36 pm

Re: Mounting shared network folder with mount R/W access

Sat Jun 30, 2018 12:06 pm

Nice. adding 'vers=1.0' worked. Note that after the password there is a comma then no space

Code: Select all

sudo mount.cifs //<IP>/public /home/pi/Shared/ -o username=pi,password=<PW>,vers=1.0
now I need to make sure it works on all older pies

Thanks so much

Return to “Networking and servers”