# How to browse net shares on a server NAS (D-link dns 320).

## augustin2

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

----------

## augustin2

I must add that I can mount the share as root

with 

```
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

----------

## augustin2

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

```

//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.

----------

## Hu

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?

----------

## augustin2

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:

```
//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.

----------

## Hu

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

----------

## fernan82

 *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.

----------

## augustin2

 *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)

----------

