Comments on Debian/Ubuntu - unable to make backup link of `./usr/sbin/sshd' before installing new version: Operation not permitted

Error: Debian/Ubuntu - unable to make backup link of `./usr/sbin/sshd' before installing new version: Operation not permitted You try to upgrade OpenSSH on Debian/Ubuntu (packages openssh-client and openssh-server) and get the following errors: Unpacking replacement openssh-server ... dpkg: error processing /var/cache/apt/archives/openssh-server_1%3a5.5p1-6_amd64.deb (--unpack): unable to make backup link of `./usr/sbin/sshd' before installing new version: Operation not permitted configured to not write apport reports Preparing to replace openssh-client 1:5.1p1-5 (using .../openssh-client_1%3a5.5p1-6_amd64.deb) ... Unpacking replacement openssh-client ... dpkg: error processing /var/cache/apt/archives/openssh-client_1%3a5.5p1-6_amd64.deb (--unpack): unable to make backup link of `./usr/bin/ssh' before installing new version: Operation not permitted

5 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Anonymous

Although my ssh file was located at /usr/bin/ssh, my sshd file was nowhere to be found. 

I ended up discovering that it was actually in the /sbin/ file.

If you run into a similar problem simply run the same commands except on the /sbin/ folder:

chattr -i /usr/sbin/sshd 

chattr -a /usr/sbin/sshd

By: JokinAU

Hi!

Google brought me here. This post was very useful for me, in my case with the error: unable to make backup link of `./usr/lib/php5/sessionclean' before installing new version: Operation not permitted

I just had to:

chattr -i /usr/lib/php5/sessionclean

chattr -a /usr/lib/php5/sessionclean

chattr +s /usr/lib/php5/sessionclean

chattr +u /usr/lib/php5/sessionclean

And it fixed my problem! Thanks a lot

By: Milani

Thanks you.

Problem solved here.

By: Ajay

Thank you Falko,

This worked for me. Why the attributes are changed. Is it a work of hackers?

Ajay

By: Tyler Jordan

worked for me - stuck in the middle of a dist-upgrade and had the 'i' (immutable) flag set on this file -->  /usr/lib/gvfs/gvfsd-metadata

A real lifesaver.  Would like to know how this sort of problem happens though.