You are not logged in.

#1 2014-07-16 17:09:10

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Clean way to remove sftp.service from avahi?

Hello,

I'd like to use a ftp.service according to https://wiki.archlinux.org/index.php/avahi#Vsftpd instead of the sftp service.
I did this by moving /etc/avahi/services/sftp-ssh.service away and restart avahi. That works, but something tells me that is a dirty solution. At the next avahi update, /etc/avahi/services/sftp-ssh.service will be there again, I suppose.

So do you know a clean way of disabling sftp? I tried to find something in /etc/avahi/avahi-daemon.conf, but didn't succeed.

Offline

#2 2014-07-16 20:09:43

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 748

Re: Clean way to remove sftp.service from avahi?

First, note that SFTP and FTPS are completely different things. Moving the existing sftp-ssh.service to ftp.service will obviously not work as desired, the wiki clearly says to create ftp.service with the content provided therein.

Offline

#3 2014-07-16 20:50:47

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Re: Clean way to remove sftp.service from avahi?

Sorry, there has been a misunderstanding. In fact, I created that ftp.service file according to the linked wiki page. I did not move sftp-ssh.service to ftp.service, I only moved the sftp-ssh.service out of the service directory which is obviously scanned by avahi.
And everything works so far as expected, the question I only, whether this is really a "clean" solution and if not, what would be the clean solution.

Offline

#4 2014-07-16 21:07:19

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 748

Re: Clean way to remove sftp.service from avahi?

You could use the NoExtract directive in pacman.conf (see the man page) to avoid pacman creating the file after each update to the avahi package, but yes, this is hackish.

Offline

#5 2014-07-17 08:37:11

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Re: Clean way to remove sftp.service from avahi?

OK; thanks, I'll try that!

background:
In Nautilus and Thunar in the "browse network" section, there are servers shown for me which I can't connect to, although I'm running FTP-servers (with the same hostname --> finding the problem was tricky..) which I can connect to with the "connect to server" option. I found out that is because of avahi which automatically offers SFTP servers there.
As I said, creating the ftp.service file as in the wiki and moving the sftp-ssh.service file away solves that issue: In the "browse network" section, there are only the ftp-servers shown shich I can connect to.

Offline

#6 2015-02-12 17:05:27

PapaNappa
Member
Registered: 2009-04-16
Posts: 7

Re: Clean way to remove sftp.service from avahi?

What is the rationale that the avahi package owns the /etc/avahi/services/{sftp-,}ssh.service files?
In my opinion, avahi should not provide any service files. Only the services itself (e.g. sftp) should.
What is missing is some configuration which services to include without changing package files that are overwritten during an update. Or is there any solution?

My machine does not offer SFTP, therefore advertising this service is just plain wrong.
While it might be correct that my machine provides SSH, I might not want to advertise it (not for security reasons, obviously, but just for not polluting the directory with a mere "personal" service intended just for me).

Last edited by PapaNappa (2015-02-12 17:06:47)

Offline

#7 2015-02-13 07:35:57

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 748

Re: Clean way to remove sftp.service from avahi?

PapaNappa wrote:

What is the rationale that the avahi package owns the /etc/avahi/services/{sftp-,}ssh.service files?

You would have to ask the developers of Avahi. Only they will know (at least they should) why Avahi assumes that every Linux system provides SSH and SFTP services and wants to advertise them.

Offline

Board footer

Powered by FluxBB