Unable to start vsftpd with upstart if private key

Bug #604185 reported by pode
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upstart
New
Undecided
Unassigned
vsftpd (Ubuntu)
Triaged
Medium
Unassigned
Maverick
Triaged
Medium
Unassigned

Bug Description

Binary package hint: vsftpd

Example of configuration added in /etc/vsftpd.conf :
=========================================
ssl_enable=YES
validate_cert=YES
ca_certs_file=/home/eric/PKILOCAL/cacert.pem
rsa_cert_file=/home/eric/PKILOCAL/cert.pem
rsa_private_key_file=/home/eric/PKILOCAL/priv.key
=========================================

$ sudo service vsftpd start
[sudo] password for eric:
vsftpd start/running, process 3166
$ ps -ef | grep -E "(vsftpd|3166)" | grep -v grep

On the contrary, it works when launching directly the vsftpd daemon :
$ sudo vsftpd
Enter PEM pass phrase:

$ ps -ef | grep -E "[v]sftpd"
root 3206 1298 0 08:00 pts/0 00:00:00 vsftpd

Could there be also a prompt for the passphrase with vsftpd launched with upstart ?

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: vsftpd 2.2.2-3ubuntu6
ProcVersionSignature: Ubuntu 2.6.32-22.36-genusername 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic i686
Architecture: i386
Date: Sun Jul 11 07:51:58 2010
ProcEnviron:
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: vsftpd

Revision history for this message
pode (autrelandes-ubuntu) wrote :
Chuck Short (zulcss)
Changed in vsftpd (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
David Sugar (dyfet-deactivatedaccount) wrote :

I believe the upstart jobs inherit the stdio settings the upstart (init) itself had at bootup, which likely point to whatever was considered the "console". Simply telling upstart to "start" a job (service vsftpb start) notifies the upstart daemon over d-bus to start the child process. Hence, it has no direct means of knowing the current console session of the user.

The sysv init script system, by contrast, would start the daemon directly from the issuing command (like sudo /etc/init.d/vfstartd start) which of course would inherit the stdio settings of the user executing the command.

This of course does not offer a solution, but rather offers better understanding of the actual core problem.

I believe this question and issue should be forwarded to upstart at least for discussion. I could do a separate summary and bug report for that.

Basically, some daemons (like vsftp) may prompt the user during startup. A common case might be to get the password for unlocking a password protected private key, and I am sure this can apply to many other daemons that may do this including for example apache. I do not believe upstart has any provision to handle this kind of scenario other than, at boot, if the process is started then, it's password prompt should appear on whatever was the "console".

Revision history for this message
David Sugar (dyfet-deactivatedaccount) wrote :

This is also somewhat related to bug 602255, though distantly. I am going to make an additional annotation about this scenario on that report.

Revision history for this message
Charlie Kravetz (charlie-tca) wrote :

Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

Changed in vsftpd (Ubuntu):
status: Confirmed → Triaged
Thierry Carrez (ttx)
tags: added: server-mrs
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.