cannot apt-get remove vsftp after installing it

Bug #901180 reported by Christopher Barrington-Leigh
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
vsftpd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I installed vsftpd.

Immediately after setting it up, I changed my mind. I tried to remove it, but cannot. After the following, vsftp gets fully *reinstalled* automatically next time I do an update. Instead, it should get fully removed when asked to.

sudo apt-get remove vsftpd

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  vsftpd
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 463 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 255631 files and directories currently installed.)
Removing vsftpd ...
vsftpd stop/waiting
dpkg: error processing vsftpd (--remove):
 subprocess installed post-removal script returned error exit status 1
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Errors were encountered while processing:
 vsftpd
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: apt 0.8.16~exp5ubuntu13
ProcVersionSignature: Ubuntu 3.0.0-13.22-generic 3.0.6
Uname: Linux 3.0.0-13-generic x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Wed Dec 7 06:19:31 2011
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110921.2)
ProcEnviron:
 LANGUAGE=en_CA:en
 PATH=(custom, user)
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
SourcePackage: apt
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

This is actually a bug in the vsftp package and the scripts it uses to install and remove itself.

affects: apt (Ubuntu) → vsftpd (Ubuntu)
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this issue and helping to make Ubuntu better.

Could you please try to remove vsftpd again, and once it has failed, execute the following command and paste the output, so that we can see where exactly it is failing? Once done, please set the the Status back to New. Thanks!

Please run (after sudo apt-get remove vsftpd has failed): sudo sh -x /var/lib/dpkg/info/vsftpd.postrm remove

Changed in vsftpd (Ubuntu):
status: New → Incomplete
Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote : Re: [Bug 901180] Re: cannot apt-get remove vsftp after installing it

Robie,
Does this help?

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
   vsftpd
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 463 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 260652 files and directories currently installed.)
Removing vsftpd ...
vsftpd stop/waiting
dpkg: error processing vsftpd (--remove):
  subprocess installed post-removal script returned error exit status 1
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Errors were encountered while processing:
  vsftpd
E: Sub-process /usr/bin/dpkg returned an error code (1)

[1331][user@:~]$ sh -x /var/lib/dpkg/info/vsftpd.postrm remove
+ set -e
+ _USERNAME=ftp
+ _GROUPNAME=ftp
+ _DIRECTORY=/srv/ftp
+ [ -x /usr/sbin/deluser ]
+ deluser --quiet --system ftp
/usr/sbin/deluser: Only root may remove a user or group from the system.

[1331][user@:~]$ sudo sh -x /var/lib/dpkg/info/vsftpd.postrm remove
+ set -e
+ _USERNAME=ftp
+ _GROUPNAME=ftp
+ _DIRECTORY=/srv/ftp
+ [ -x /usr/sbin/deluser ]
+ deluser --quiet --system ftp

Revision history for this message
Robie Basak (racb) wrote :

Christopher,

There was definitely no further output?

If so then please repeat, and if you get the same result again, type at the end:
  sudo deluser --system ftp
  echo $?

And paste the results. Thanks!

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

Robie,
Here you go:

$ sudo apt-get remove vsftpd
[sudo] password for user:
(process:1135): GConf-WARNING **: Client failed to connect to the D-BUS
daemon:
Did not receive a reply. Possible causes include: the remote application
did not send a reply, the message bus security policy blocked the reply,
the reply timeout expired, or the network connection was broken.

(process:1135): GConf-WARNING **: Client failed to connect to the D-BUS
daemon:
Did not receive a reply. Possible causes include: the remote application
did not send a reply, the message bus security policy blocked the reply,
the reply timeout expired, or the network connection was broken.

(process:1135): GConf-WARNING **: Client failed to connect to the D-BUS
daemon:
Did not receive a reply. Possible causes include: the remote application
did not send a reply, the message bus security policy blocked the reply,
the reply timeout expired, or the network connection was broken.
QGtkStyle was unable to detect the current GTK+ theme.

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
   vsftpd
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 463 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 260605 files and directories currently installed.)
Removing vsftpd ...
dpkg: error processing vsftpd (--remove):
  subprocess installed post-removal script returned error exit status 1
Processing triggers for ureadahead ...
Errors were encountered while processing:
  vsftpd
E: Sub-process /usr/bin/dpkg returned an error code (1)
[1626][user@:~]$ sudo sh -x /var/lib/dpkg/info/vsftpd.postrm remove
+ set -e
+ _USERNAME=ftp
+ _GROUPNAME=ftp
+ _DIRECTORY=/srv/ftp
+ [ -x /usr/sbin/deluser ]
+ deluser --quiet --system ftp
[1626][user@:~]$ sudo deluser --system ftp
The user `ftp' is not a system user. Exiting.
[1626][user@:~]$ echo $?
1
[1627][user@:~]$

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

Oh. So it's all my fault.
Following someone instructions when first installing, I must have done a adduser ftp.

sorry.
Unless you think there should be a more detailed error message, I'm marking my bug as invalid.

Changed in vsftpd (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
George Peaslee (gpeaslee) wrote :

Edit the file /var/lib/dpkg/info/vsftp.postrm and comment out the lines which remove the user 'ftp' and group 'ftp'. Edit them as sudo, like this:

sudo nano /var/lib/dpkg/info/vsftpd.postrm

The run apt-get (or your favorite uninstaller) to remove vsftpd:

sudo apt-get remove vsftpd

Revision history for this message
Basavaraj Chougala (macmillana-s) wrote :

Dear Sir,

Error is there in VSFTPD server , So I want to delete this Package and it's Config file, script file, dependencies packages and Everything related to VSFTPD Package.

for that, Which commands I have to run on Terminal in Ubuntu 12.04 ?

Please kindly Help me Sir......

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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