Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to browse net shares on a server NAS (D-link dns 320).
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Thu Aug 28, 2014 7:18 am    Post subject: How to browse net shares on a server NAS (D-link dns 320). Reply with quote

hi,
This question is a bit différent from the one I posted before regarding davfs2.
I use a D-Link DNS 320 NAS server on which I have created net shares for which I have enabled CIFS FTP and WebDAV.
From a debian system or a ubuntu system, with no special configuration, using nautilus, I can browse the network and read / write my shares as if it was a hard disk in my computer.
As I mainly use my Gentoo box (the one I prefer) I would like to get the same behavior. At the moment, when clicking on Browse network in nautilus, I see nothing.
On both systems (Debian and Gentoo) I use Gnome3.

Could somebody tell me what are the requirements for this to work properly on Gentoo ?
At the moment I have installed samba with (smbclient use flag and kernel configuration as explained on the wiki) and gnome-vfs (with samba use flag).


Last edited by augustin2 on Sat Aug 30, 2014 3:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Thu Aug 28, 2014 9:42 am    Post subject: Reply with quote

I must add that I can mount the share as root
with
Code:
mount -t cifs -o username=USER,password=PSWORD //192.168.1.15/Directory /mnt/aDir

and see the content with ls
but I cannot browse in nautilus
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Sun Aug 31, 2014 3:19 pm    Post subject: Reply with quote

Hi everybody

Eventually after reading a lot I could manage to mount my NAS as cifs filesystem and using the x-systemd.automont command to have it automatically mounted at boot. Using only auto didn't work because of the delay for the network to be ready.
Here is my fstab line

Code:

//192.168.1.15/Volume_1/jaaf-RootDir  /media/NAS  cifs auto,x-systemd.automount,credentials=/home/jaaf/.NASCredentials,uid=jaaf,gid=jaaf  0 0


It is a great step for me but not entirely satisfactory. Indeed, I cannot write or delete anything in the share despite the fact that permission for all things give:

- owner: Me (create and delete files)
-group: jaaf (create and delete files)
-others: (create and delete files)

That mean that my share is practically unsable to save data ! How comes this sitation?

Any help would be welcome.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14281

PostPosted: Sun Aug 31, 2014 3:41 pm    Post subject: Reply with quote

Network filesystems must be marked _netdev in their options to defer starting them until after the network is up. What happens when you try to write a new file to the NAS? What error do you get? If you use smbclient with the same credentials to upload a file, does that work?
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Sun Aug 31, 2014 3:55 pm    Post subject: Reply with quote

Hi Hu,
Thank you for help.
I have tried to mark it _netdev but it didn't change anything. I could not manage to have it working with smbclient but eventally I managed to mount it like cifs with the following:

Code:
//192.168.1.15/Volume_1/jaaf-RootDir  /media/NAS  cifs auto,x-systemd.automount,credentials=/home/jaaf/.NASCredentials,uid=jaaf,gid=jaaf  0 0


The share is now automatically mounted but unfortunately, I am facing a new problem. Everything is marked "can read can write" in nautilus for owner : Me, group: jaaf and others but in fact I can only read, I cannot write or delete something.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14281

PostPosted: Sun Aug 31, 2014 5:27 pm    Post subject: Reply with quote

You restated the post that I already answered, but did not provide any new information. Please answer the questions I posted previously.
Back to top
View user's profile Send private message
fernan82
n00b
n00b


Joined: 24 Jul 2014
Posts: 70

PostPosted: Sun Aug 31, 2014 7:26 pm    Post subject: Reply with quote

augustin2 wrote:
Hi Hu,
The share is now automatically mounted but unfortunately, I am facing a new problem. Everything is marked "can read can write" in nautilus for owner : Me, group: jaaf and others but in fact I can only read, I cannot write or delete something.



The permissions you see are the ones that you used to mount the share, you can set those with the uid, gid, umask, fmask, and dmask mount options.

After that you still have to go through the authentication on the device hosting the share, so the account that you used to access the share mostlikely doesn't have the right permissions. If it was a samba share it would have to go through a 3rd layer of security: the unix permissions on the host.

I would like to know the answer to your original question though: how can we access the workgroup shares through the file manager without having to mount them (just as in Windows and some other distros). I use KDE and when I try it on Dolphin it gives me an error about KDE not being built with zeroconf so I guess we need to rebuild some packages with certain use flags but I don't know which. IIRC I tried adding the zeroconf use flag to make.conf and ran emerge -vau --changed-use @world and it only listed a few packages that wheren't even part of KDE.
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Mon Sep 01, 2014 5:52 am    Post subject: Reply with quote

Hu wrote:
You restated the post that I already answered, but did not provide any new information. Please answer the questions I posted previously.


Hi Hu,
My apologies, I was probably a bit confused and tired.
I came back to the page about samba in the wiki
At the moment I deleted any line in /etc/fstab and mounted the share like this

Quote:
mount -t cifs -o credentials=/home/jaaf/.NASCredentials //192.168.1.15/Volume_1/jaaf-RootDir/ /media/NAS


An icon NAS appeared in Nautilus (not in the network space) but under the other drives.
Clicking the icon (I suppose it use the smb client that way) show me the content of the share, but I cannot write or read anything (I am told "permission denied")

It is the same if I add uid=1000,gid=1000 to the options.

What seems strange to me , as it is very different from othe distro (ubuntu, debian)' I never see the shares in Browse Network and I cannot even connect to a server with smb://192.168.1.15/Volume_1/jaaf-RootDir (the connect button stays greyed)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum