Nemo afp/smb share problem

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
IPA
Level 1
Level 1
Posts: 27
Joined: Mon Nov 21, 2016 4:16 pm

Nemo afp/smb share problem

Post by IPA »

I have a Synology DiskStation in my LAN, and to access it I browse to it using Nemo and login/mount folders. When I do, Nemo presents two entries with identical names "DiskStation (File Sharing)". One is the DiskStation smb service and the other the DiskStation afp service, but the Nemo names do not differentiate which is which. Hmmm...

Can Nemo be made to present different names for the two DiskStation entries, so that I can easily distinguish between them and choose the service I want to use. E.G. "DiskStation (smb File Sharing)" and "DiskStation (afp File Sharing)".

Appreciate some help. Thanks
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
MRL_LMint
Level 1
Level 1
Posts: 31
Joined: Mon Mar 08, 2021 10:39 am

Re: Nemo afp/smb share problem

Post by MRL_LMint »

No answer...? I have the same question.
Newbie...
hans123
Level 3
Level 3
Posts: 149
Joined: Mon Jun 11, 2007 11:15 am

Re: Nemo afp/smb share problem

Post by hans123 »

I would expect that Nemo (or any network browser) would use the name that the service on the NAS (your diskstation) uses to make itself known. Did you look in the setup there?
User avatar
AndyMH
Level 21
Level 21
Posts: 13728
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Nemo afp/smb share problem

Post by AndyMH »

IPA wrote: Sat Feb 13, 2021 11:10 am I have a Synology DiskStation in my LAN, and to access it I browse to it using Nemo and login/mount folders. When I do, Nemo presents two entries with identical names "DiskStation (File Sharing)". One is the DiskStation smb service and the other the DiskStation afp service, but the Nemo names do not differentiate which is which. Hmmm...
Disable afp on the synology. I do not have that problem.
Screenshot from 2021-03-08 17-16-29.png
I access my synology two ways:
  • I have a launcher on the desktop with the command line nemo smb://diskstation.local
Screenshot from 2021-03-08 17-25-29.png
Screenshot from 2021-03-08 17-25-29.png (14.74 KiB) Viewed 2495 times
  • and I mount it via fstab (mounting in media) so it appears in the devices pane in nemo (synology and music):
Screenshot from 2021-03-08 17-21-20.png
Relevant fstab entries:

Code: Select all

#diskstation mounting under cifs
//diskstation.local/home/	/media/synology	cifs	credentials=/etc/samba/credentials,uid=1000,gid=1000,nofail	0	0
#diskstation mounting music under cifs
//diskstation.local/music/	/media/music	cifs	credentials=/etc/samba/credentials,uid=1000,gid=1000,nofail	0	0
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
IPA
Level 1
Level 1
Posts: 27
Joined: Mon Nov 21, 2016 4:16 pm

Re: Nemo afp/smb share problem

Post by IPA »

Thanks for the responses, haven't been here for a while so apologies for the tardy reply.

AndyMH: "Disable afp on the synology."

I use afp for Mac so don't want to disable it.

I prefer to open a share through the browser when I need it and not before, but yes I could use a desktop launcher. It's just that I'd prefer Nemo to work sensibly, and not present two different services with the same name.


hans123: "I would expect that Nemo (or any network browser) would use the name that the service on the NAS (your diskstation) uses to make itself known. Did you look in the setup there?"

The DiskStation is presenting one file share (and one name), via two different protocols. I don't believe there is a way to make the DiskStation service modify the name. I have actually looked at the setup, but have not found any way of modifying the name on a protocol basis.

On the other hand Nemo does actually know the protocol name before opening the share (look on Properties>Permissions), but does not show it. So it might be possible for Nemo to present a modified name using a Nemo script.

Thanks
ericj
Level 3
Level 3
Posts: 102
Joined: Tue Jan 01, 2019 1:42 pm

Re: Nemo afp/smb share problem

Post by ericj »

I have a sort of related issue, I have 2 WD N.A.S. devices attached, when I click the network link in the file manager it shows 2 instances of one of them, but doesn't seem to matter which of those I click to login.

However sometimes I get an error and am not presented with the login window and the message says something about not having a program to open afp device or something to that effect. I've just been living with it cause I hate playing around with the O.S. any more :) I have quite a bit of Windows/MS-DOS experience and even programming for Win but these days I want to use my computer not have to tinker with it. Of course if there is a simple solution to this it would be great.
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: Nemo afp/smb share problem

Post by altair4 »

I prefer to open a share through the browser when I need it and not before, but yes I could use a desktop launcher. It's just that I'd prefer Nemo to work sensibly, and not present two different services with the same name.
It's not nemo. It's how the server is broadcasting itself.

If the situation was reversed and your server was a Linux machine the fix would be simple. Create an avahi service file for each protocol specifying a label that differentiates each. So the client to this server would see hostname SMB , hostname AFP, hostname SSH .......
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
AndyMH
Level 21
Level 21
Posts: 13728
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Nemo afp/smb share problem

Post by AndyMH »

I don't believe there is a way to make the DiskStation service modify the name. I have actually looked at the setup, but have not found any way of modifying the name on a protocol basis.
Ask synology, I've found their tech support reasonably responsive. It does run some flavour of linux, so you never know! And when you get an answer, share it.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
IPA
Level 1
Level 1
Posts: 27
Joined: Mon Nov 21, 2016 4:16 pm

Re: Nemo afp/smb share problem

Post by IPA »

" Nemo does actually know the protocol name before opening the share (look on Properties>Permissions), but does not show it. So it might be possible for Nemo to present a modified name using a Nemo script. "
ericj
Level 3
Level 3
Posts: 102
Joined: Tue Jan 01, 2019 1:42 pm

Re: Nemo afp/smb share problem

Post by ericj »

When I right-click either of the 2 N.A.S device icons which show in the Network and look at properties and then permissions it says "The permissions of (Name of N.A.S. here) could not be determined.
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: Nemo afp/smb share problem

Post by altair4 »

It should say:
The permissions of XXX could not be determined.
Where XXX is smb, or afp, or sftp, or .....
NemoProp.png
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
IPA
Level 1
Level 1
Posts: 27
Joined: Mon Nov 21, 2016 4:16 pm

Re: Nemo afp/smb share problem

Post by IPA »

Nemo > Network > DiskStation > Properties > Permissions

shows either ' The permissions of "afp" could not be determined ' or ' The permissions of "smb" could not be determined ''

Nemo does know what protocol it is but does not show it directly, instead it calls the two entries the same name !
User avatar
AndyMH
Level 21
Level 21
Posts: 13728
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Nemo afp/smb share problem

Post by AndyMH »

IPA wrote: Thu Mar 11, 2021 1:34 pm Nemo does know what protocol it is but does not show it directly, instead it calls the two entries the same name !
This is not a nemo problem as altair4 has already pointed out.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
IPA
Level 1
Level 1
Posts: 27
Joined: Mon Nov 21, 2016 4:16 pm

Re: Nemo afp/smb share problem

Post by IPA »

AndyMH: This is not a nemo problem as altair4 has already pointed out.

Please re read my original question. If you have some constructive input on the question I asked I'd be glad to hear it. Thanks
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: Nemo afp/smb share problem

Post by altair4 »

@AndyMH, as our resident Synology expert I have a question:

Does the user have access to the internals of the operating system ... perhaps using ssh?

The reason I ask is I did a search yesterday trying to find out how Synology uses mDNS and found an unrelated thread here: https://community.synology.com/enu/forum/1/post/128198 In it they reference an avahi service file located at /etc/avahi/services/dsminfo.service

I don't know anything about dsminfo but that file location is exactly where it would be on a Linux system for an avahi service file. They probably have an /etc/avahi/services/smb.service file and it would be trivial to edit to include a marker designating it as hostname SMB to its clients.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
AndyMH
Level 21
Level 21
Posts: 13728
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Nemo afp/smb share problem

Post by AndyMH »

Yes
https://mariushosting.com/how-to-ssh-in ... ology-nas/
And this is the contents of /etc/avahi/services/dsminfo.service:

Code: Select all

andy@DiskStation:~$ cat /etc/avahi/services/dsminfo.service

<service-group>
<name>DiskStation</name>
<service>
<type>_http._tcp</type>
<port>5000</port>
<txt-record>vendor=Synology</txt-record>
<txt-record>model=DS216j</txt-record>
<txt-record>serial=16B0NNN006517</txt-record>
<txt-record>version_major=6</txt-record>
<txt-record>version_minor=2</txt-record>
<txt-record>version_build=24922</txt-record>
<txt-record>admin_port=5000</txt-record>
<txt-record>secure_admin_port=5001</txt-record>
<txt-record>mac_address=00:11:32:70:39:a4</txt-record>
</service>
</service-group>
and this is smb.service (along with dsminfo.service & ftp.service the only files in ./avahi/services)

Code: Select all

andy@DiskStation:/etc/avahi/services$ cat smb.service
<service-group>
<name>DiskStation</name>
<service>
<type>_device-info._tcp</type>
<txt-record>model=Xserve</txt-record>
</service>
<service>
<type>_smb._tcp</type>
<port>445</port>
</service>
</service-group>
Note - this is the first time I've 'looked inside the box' :)
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: Nemo afp/smb share problem

Post by altair4 »

This line determines what the client sees for the smb server:
<name>DiskStation</name>
If this were an Ubuntu server all that needs to de done is change it to:
<name>DiskStation SMB</name>
In ubuntu you don't even need to restart the avahi-daemon service as the change is automatic.

In dealing with other users that have NAS devices I am very impressed with Synology - very impressed. A given user might not be willing to muck about with the internals of this system but I would be willing to bet Synology might be. They could make the change to other avahi services like FTP, AFP, ....

I don't know how one goes about submitting a feature request or bug report with these folks but it might be worth a try.

This way it would benefit all Linux file managers not just Nemo/
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
AndyMH
Level 21
Level 21
Posts: 13728
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Nemo afp/smb share problem

Post by AndyMH »

altair4 wrote: Fri Mar 12, 2021 9:48 am I don't know how one goes about submitting a feature request or bug report with these folks but it might be worth a try.
As I've said their tech support is responsive, there also is an active forum. But this is the OP's problem not mine :)
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
IPA
Level 1
Level 1
Posts: 27
Joined: Mon Nov 21, 2016 4:16 pm

Re: Nemo afp/smb share problem

Post by IPA »

OK that's helpful. Thank you. I'll try it, but it will have to be in a few days time.

Let's hope it survives DiskStation software updates.

Thanks
IPA
Level 1
Level 1
Posts: 27
Joined: Mon Nov 21, 2016 4:16 pm

Re: Nemo afp/smb share problem

Post by IPA »

OK I've had a chance to try this.

I edited the etc/avahi/services/afp.service file, as suggested above, and was able to give the service a distinct name, as seen by Nemo. However it seems the files in the etc/avahi/services directory are rebuilt afresh each time the DiskStation is booted, so the change does not survive.

The file is returned to the settings from the GUI control panel. Even with no change to the files, they are rebuilt at boot time. This is presumably a method to ensure the running system matches the parameters set in the GUI control panel.

So, unfortunately this doesn't solve the problem.

Incidentally, the name usually displayed by Nemo is "DiskStation (File Sharing)". The name in the afp.services file is just "DiskStation". So the "(File Sharing)" is being appended somewhere else. Any thoughts on where that is appended ?

When I changed the name in afp.services to "DiskStationAFP", Nemo displayed just "DiskStationAFP" without the "(File Sharing)" appendage.
Locked

Return to “Networking”