[lxc-users] Bad permissions on /usr/sbin

Saint Michael venefax at gmail.com
Thu Dec 10 16:57:04 UTC 2015


In my LXC Ubuntu 14.04 server, I was trying to run
apt-get -f install
and found out that I cannot erase or create any file under /usr/sbin
other dirs like /usr/bin are find

The subdir /usr/sbin has identical atttributes to /usr/sbin in other
servers, but it still does not work.
This messed up my updates, since no file can be updated if inside /usr/sbin

 stat /usr/sbin
  File: '/usr/sbin'
  Size: 12288           Blocks: 24         IO Block: 4096   directory
Device: 801h/2049d      Inode: 2100057     Links: 2
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2015-03-07 21:34:04.880465440 -0500
Modify: 2015-12-03 05:25:29.241657014 -0500
Change: 2015-12-03 05:25:29.245657203 -0500

lsattr sbin/qemu-make-debian-root
-------------e-- sbin/qemu-make-debian-root
and all files like that

But
rm /usr/sbin/qemu-make-debian-root
rm: cannot remove '/usr/sbin/qemu-make-debian-root': Permission denied

How I fix my /usr/sbin? I think this is a virus.

ls -la /usr/sbin -hls
total 9.9M
  12K drwxr-xr-x  2 root root   12K Dec  3 05:25 .
 4.0K drwxr-xr-x 11 root root  4.0K Dec 10 11:00 ..
  12K -rwxrwxrwx  1 root root   11K Sep  9 12:02 .chattr
 4.0K -rwxrwxrwx  1 root root  2.6K Jun 18 02:48 aa-exec
 8.0K -rwxrwxrwx  1 root root  6.5K Jun 18 02:48 aa-status
  12K -rwxrwxrwx  1 root root   11K Sep 23  2014 accessdb
  48K -rwxrwxrwx  1 root root   47K Apr  3  2014 acpid
 4.0K -rwxrwxrwx  1 root root   695 Aug 28  2013 add-shell
    0 lrwxrwxrwx  1 root root     7 Nov  7  2014 addgroup -> adduser
  36K -rwxrwxrwx  1 root root   35K Nov  7  2013 adduser
 4.0K -rwxrwxrwx  1 root root  2.7K Nov  9  2014 amuFormat.sh
    0 lrwxrwxrwx  1 root root     9 Jun 18 02:48 apparmor_status ->
aa-status
  56K -rwxrwxrwx  1 root root   55K Aug  5  2014 arp
  40K -rwxrwxrwx  1 root root   39K Jul 23 12:19 arpd
 4.0K -rwxrwxrwx  1 root root   616 Nov  9  2014 ast.sh
 4.0K -rwxrwxrwx  1 root root    62 Nov  9  2014 astreset.sh
  24K -rwxrwxrwx  1 root root   23K Oct 21  2013 atd
 8.0K -rwxrwxrwx  1 root root  4.8K Nov  9  2014 atigetsysteminfo.sh
  12K -rwxrwxrwx  1 root root   11K Apr 29  2014 avcstat
  20K -rwxrwxrwx  1 root root   19K Sep 16  2013 biosdecode
  28K -rwxrwxrwx  1 root root   27K Apr 21  2015 chat
 4.0K -rwxrwxrwx  1 root root   340 Nov  9  2014 check_dialers.sh
 4.0K -rwxrwxrwx  1 root root   148 Nov  9  2014 check_lxc.sh
 4.0K -rwxrwxrwx  1 root root   143 Nov  9  2014 check_net.sh
 4.0K -rwxrwxrwx  1 root root  1.1K Sep 21 06:45 check_servers.sh
  52K -rwxrwxrwx  1 root root   51K Jul 15 15:29 chgpasswd
  48K -rwxrwxrwx  1 root root   47K Jul 15 15:29 chpasswd
  32K -rwxrwxrwx  1 root root   31K Jan 13  2015 chroot
 4.0K -rwxrwxrwx  1 root root   242 Nov  9  2014 clean-genome.sh
 4.0K -rwxrwxrwx  1 root root  2.7K Nov  9  2014 commands.sh
 8.0K -rwxrwxrwx  1 root root  6.2K Apr 29  2014 compute_av
 8.0K -rwxrwxrwx  1 root root  6.2K Apr 29  2014 compute_create
 8.0K -rwxrwxrwx  1 root root  6.2K Apr 29  2014 compute_member
 8.0K -rwxrwxrwx  1 root root  6.2K Apr 29  2014 compute_relabel
 8.0K -rwxrwxrwx  1 root root  6.2K Apr 29  2014 compute_user
    0 lrwxrwxrwx  1 root root     4 Jul 15 15:29 cpgr -> cppw
  52K -rwxrwxrwx  1 root root   49K Jul 15 15:29 cppw
  44K -rwxrwxrwx  1 root root   44K Feb  9  2013 cron
  16K -rwxrwxrwx  1 root root   15K Sep  2 14:35 cytune
  20K -rwxrwxrwx  1 root root   19K Nov  3 10:36 debootstrap
    0 lrwxrwxrwx  1 root root     7 Nov  7  2014 delgroup -> deluser
  20K -rwxrwxrwx  1 root root   17K Nov  7  2013 deluser
 4.0K -rwxrwxrwx  1 root root   169 Nov  9  2014 dialer-update.sh
 100K -rwxrwxrwx  1 root root   99K Sep 16  2013 dmidecode
 292K -rwxrwxrwx  1 root root  289K May  1  2015 dnsmasq
 4.0K -rwxrwxrwx  1 root root  3.6K Feb 23  2014 dpkg-preconfigure
 8.0K -rwxrwxrwx  1 root root  4.7K Feb 23  2014 dpkg-reconfigure
  12K -rwxrwxrwx  1 root root   11K Sep  9 12:02 e2freefrag
  28K -rwxrwxrwx  1 root root   27K Sep  9 12:02 e4defrag
 4.0K -rwxrwxrwx  1 root root    48 Nov  9  2014 en.sh
  12K -rwxrwxrwx  1 root root   11K Sep  2 14:35 fdformat
  16K -rwxrwxrwx  1 root root   15K Sep  9 12:02 filefrag
 4.0K -rwxrwxrwx  1 root root   760 Nov  9  2014 firewall.sh
  12K -rwxrwxrwx  1 root root   11K Nov  9  2014 genk.sh
  12K -rwxrwxrwx  1 root root   11K Apr 29  2014 getconlist
  12K -rwxrwxrwx  1 root root   11K Apr 29  2014 getdefaultcon
 8.0K -rwxrwxrwx  1 root root  6.2K Apr 29  2014 getenforce
 8.0K -rwxrwxrwx  1 root root  6.2K Apr 29  2014 getfilecon
 8.0K -rwxrwxrwx  1 root root  6.2K Apr 29  2014 getpidcon
  12K -rwxrwxrwx  1 root root   11K Apr 29  2014 getsebool
 8.0K -rwxrwxrwx  1 root root  6.2K Apr 29  2014 getseuser
 8.0K -rwxrwxrwx  1 root root  4.6K Nov  9  2014 gettext.sh
  56K -rwxrwxrwx  1 root root   55K Jul 15 15:29 groupadd
  52K -rwxrwxrwx  1 root root   51K Jul 15 15:29 groupdel
  68K -rwxrwxrwx  1 root root   65K Jul 15 15:29 groupmod
  52K -rwxrwxrwx  1 root root   51K Jul 15 15:29 grpck
  48K -rwxrwxrwx  1 root root   47K Jul 15 15:29 grpconv
  48K -rwxrwxrwx  1 root root   47K Jul 15 15:29 grpunconv
    0 lrwxrwxrwx  1 root root    35 Sep 30 11:03 grub-bios-setup ->
../lib/grub/i386-pc/grub-bios-setup
 948K -rwxrwxrwx  1 root root  945K Sep 30 11:03 grub-install
 744K -rwxrwxrwx  1 root root  742K Sep 30 11:03 grub-macbless
 8.0K -rwxrwxrwx  1 root root  7.8K Sep 30 11:01 grub-mkconfig
 196K -rwxrwxrwx  1 root root  193K Sep 30 11:03 grub-mkdevicemap
 756K -rwxrwxrwx  1 root root  755K Sep 30 11:03 grub-probe
 8.0K -rwxrwxrwx  1 root root  4.1K Sep 30 11:01 grub-reboot
 4.0K -rwxrwxrwx  1 root root  3.5K Sep 30 11:01 grub-set-default
  36K -rwxrwxrwx  1 root root   35K Feb 25  2015 iconvconfig
  16K -rwxrwxrwx  1 root root   15K Nov 21 01:48 init.lxc
 844K -rwxrwxrwx  1 root root  842K Nov 21 01:48 init.lxc.static
 8.0K -rwxrwxrwx  1 root root  4.5K Dec  5  2012 install-sgmlcatalog
 4.0K -rwxrwxrwx  1 root root  4.0K Nov  9  2014 install_64.sh
 4.0K -rwxrwxrwx  1 root root  1.3K Nov  9  2014 install_fedora_container.sh
  16K -rwxrwxrwx  1 root root   15K Jun 14 23:31 invoke-rc.d
    0 lrwxrwxrwx  1 root root    14 Jan  8  2014 ip6tables-apply ->
iptables-apply
 4.0K -rwxrwxrwx  1 root root   108 Nov  9  2014 iperfclient.sh
 4.0K -rwxrwxrwx  1 root root    38 Nov  9  2014 iperfserver.sh
 4.0K -rwxrwxrwx  1 root root   177 Nov  9  2014 ipt.sh
 8.0K -rwxrwxrwx  1 root root  6.9K Jan  8  2014 iptables-apply
  44K -rwxrwxrwx  1 root root   44K Sep 11 05:31 irqbalance
 4.0K -rwxrwxrwx  1 root root  2.6K Mar  6  2010 laptop-detect
 4.0K -rwxrwxrwx  1 root root   272 Nov  9  2014 large_systems.sh
  16K -rwxrwxrwx  1 root root   15K Sep  2 14:35 ldattach
 4.0K -rwxrwxrwx  1 root root   393 Mar  7  2015 listppa.sh
 8.0K -rwxrwxrwx  1 root root  6.5K Feb 14  2014 locale-gen
  64K -rwxrwxrwx  1 root root   64K Jan 22  2014 logrotate
 4.0K -rwxrwxrwx  1 root root   164 Feb 16  2015 make_tty.sh
 4.0K -rwxrwxrwx  1 root root   414 Nov  9  2014 mass_replace_macs.sh
  12K -rwxrwxrwx  1 root root   11K Apr 29  2014 matchpathcon
 8.0K -rwxrwxrwx  1 root root  4.5K Nov  9  2014 menu.sh
  12K -rwxrwxrwx  1 root root  9.9K Mar  3  2014 mkinitramfs
  12K -rwxrwxrwx  1 root root   11K Sep  9 12:02 mklost+found
 4.0K -rwxrwxrwx  1 root root    30 Nov  9  2014 net.sh
 4.0K -rwxrwxrwx  1 root root   797 Nov  9  2014 network-settings.sh
 4.0K -rwxrwxrwx  1 root root   179 Nov 11  2014 newmac.sh
  72K -rwxrwxrwx  1 root root   71K Jul 15 15:29 newusers
  16K -rwxrwxrwx  1 root root   15K Jan  8  2014 nfnl_osf
 8.0K -rwxrwxrwx  1 root root  6.2K Jul 15 15:29 nologin
 108K -rwxrwxrwx  1 root root  105K Oct 23 12:45 ntpdate
 4.0K -rwxrwxrwx  1 root root   593 Oct 23 12:45 ntpdate-debian
 4.0K -rwxrwxrwx  1 root root    49 Nov  9  2014 nudev.sh
 4.0K -rwxrwxrwx  1 root root   130 Nov  9  2014 optimize.sh
  12K -rwxrwxrwx  1 root root   11K Sep 16  2013 ownership
  20K -rwxrwxrwx  1 root root   20K Jan 31  2014 pam-auth-update
 4.0K -rwxrwxrwx  1 root root  2.9K Jan 31  2014 pam_getenv
  12K -rwxrwxrwx  1 root root   11K Jan 31  2014 pam_timestamp_check
 4.0K -rwxrwxrwx  1 root root  1.5K Nov  9  2014 pm-utils-bugreport-info.sh
 8.0K -rwxrwxrwx  1 root root  6.2K Apr 29  2014 policyvers
 4.0K -rwxrwxrwx  1 root root   543 May 13  2013 popcon-largest-unused
 8.0K -rwxrwxrwx  1 root root  4.2K May 13  2013 popularity-contest
  60K -rwxrwxrwx  1 root root   60K Mar  7  2013 pppconfig
 340K -rwxrwxrwx  1 root root  340K Apr 21  2015 pppd
  20K -rwxrwxrwx  1 root root   19K Apr 21  2015 pppdump
  20K -rwxrwxrwx  1 root root   19K Apr 21  2015 pppoe-discovery
  20K -rwxrwxrwx  1 root root   18K Jul  3  2011 pppoeconf
  16K -rwxrwxrwx  1 root root   15K Apr 21  2015 pppstats
  48K -rwxrwxrwx  1 root root   47K Jul 15 15:29 pwck
  44K -rwxrwxrwx  1 root root   43K Jul 15 15:29 pwconv
  36K -rwxrwxrwx  1 root root   34K Jul 15 15:29 pwunconv
 8.0K -rwxr-xr-x  1 root root  4.8K Feb  4  2014 qemu-make-debian-root
  16K -rwxrwxrwx  1 root root   15K Sep  2 14:35 readprofile
 4.0K -rwxrwxrwx  1 root root   710 Nov  9  2014 readtemp.sh
 4.0K -rwxrwxrwx  1 root root    64 Nov  9  2014 receive.sh
 4.0K -rwxrwxrwx  1 root root  1.6K Nov  9  2014 reject.sh
 4.0K -rwxrwxrwx  1 root root   749 Aug 28  2013 remove-shell
 4.0K -rwxrwxrwx  1 root root   646 Nov  9  2014 requisites.sh
 4.0K -rwxrwxrwx  1 root root   474 Nov  9  2014 restartst.sh
    0 lrwxrwxrwx  1 root root    21 Nov  7  2014 rmt ->
/etc/alternatives/rmt
  52K -rwxrwxrwx  1 root root   51K Feb  4  2014 rmt-tar
 4.0K -rwxrwxrwx  1 root root   126 Nov  9  2014 rnet.sh
 512K -rwxrwxrwx  1 root root  510K May  6  2015 rsyslogd
  24K -rwxrwxrwx  1 root root   23K Sep  2 14:35 rtcwake
  12K -rwxrwxrwx  1 root root   11K Jan 12  2014 safe_finger
  16K -rwxrwxrwx  1 root root   15K Apr 29  2014 sefcontext_compile
 8.0K -rwxrwxrwx  1 root root  6.2K Apr 29  2014
selinux_check_securetty_context
 8.0K -rwxrwxrwx  1 root root  6.2K Apr 29  2014 selinuxenabled
 8.0K -rwxrwxrwx  1 root root  6.2K Apr 29  2014 selinuxexeccon
 8.0K -rwxrwxrwx  1 root root  4.8K Mar 12  2014 service
 8.0K -rwxrwxrwx  1 root root  6.2K Apr 29  2014 setenforce
 8.0K -rwxrwxrwx  1 root root  6.2K Apr 29  2014 setfilecon
  12K -rwxrwxrwx  1 root root   11K Feb 18  2013 setvesablank
 4.0K -rwxrwxrwx  1 root root   104 Nov  9  2014 shipout.sh
 4.0K -rwxrwxrwx  1 root root   292 Nov  9  2014 ssh_init.sh
 236K -rwxr-xr-x  1 root root  235K Dec  3 05:25 sshd
 4.0K -rwxrwxrwx  1 root root   265 Nov  9  2014 startall.sh
 4.0K -rwxrwxrwx  1 root root    95 Nov  9  2014 stats.sh
 4.0K -rwxrwxrwx  1 root root   402 Nov  9  2014 stopall.sh
 4.0K -rwxrwxrwx  1 root root   100 Nov  9  2014 syncme.sh
 4.0K -rwxrwxrwx  1 root root   936 Feb  4  2014 tarcat
  12K -rwxrwxrwx  1 root root   11K Jan 12  2014 tcpd
  24K -rwxrwxrwx  1 root root   23K Jan 12  2014 tcpdchk
  20K -rwxrwxrwx  1 root root   19K Jan 12  2014 tcpdmatch
1000K -rwxrwxrwx  1 root root 1000K Apr 24  2015 tcpdump
 4.0K -rwxrwxrwx  1 root root   354 Feb  8  2015 test_device.sh
 572K -rwxrwxrwx  1 root root  571K Sep 11 10:57 thermald
  12K -rwxrwxrwx  1 root root   11K Apr 29  2014 togglesebool
  12K -rwxrwxrwx  1 root root   11K Jan 12  2014 try-from
  12K -rwxrwxrwx  1 root root   11K Sep  2 14:35 tunelp
  52K -rwxrwxrwx  1 root root   51K Nov  9  2014 tuning-primer.sh
 4.0K -rwxrwxrwx  1 root root   106 Oct 19  2009 tzconfig
 4.0K -rwxrwxrwx  1 root root   163 Dec  8 01:21 ubupdate.sh
 4.0K -rwxrwxrwx  1 root root  3.9K Feb 28  2014 ufw
 4.0K -rwxrwxrwx  1 root root   441 Nov  9  2014 upd.sh
 4.0K -rwxrwxrwx  1 root root  3.5K Feb 23  2014 update-apt-xapian-index
 8.0K -rwxrwxrwx  1 root root  4.2K Feb 20  2015 update-ca-certificates
  12K -rwxrwxrwx  1 root root  9.2K Dec  5  2012 update-catalog
 4.0K -rwxrwxrwx  1 root root    64 May 13  2015 update-grub
 4.0K -rwxrwxrwx  1 root root   241 Aug 16  2011 update-grub-gfxpayload
    0 lrwxrwxrwx  1 root root    11 Sep 30 11:03 update-grub2 -> update-grub
 4.0K -rwxrwxrwx  1 root root  1.7K Dec 11  2013 update-info-dir
  12K -rwxrwxrwx  1 root root  9.0K May 31  2012 update-initramfs
 4.0K -rwxrwxrwx  1 root root  3.0K Sep 14  2010 update-locale
  12K -rwxrwxrwx  1 root root  8.4K Jan  6  2015 update-mime
  32K -rwxrwxrwx  1 root root   31K Apr  9  2014 update-passwd
 4.0K -rwxrwxrwx  1 root root  2.9K Mar 24  2014 update-pciids
  20K -rwxrwxrwx  1 root root   20K Jun  5  2011 update-python-modules
  20K -rwxrwxrwx  1 root root   17K Jun 14 23:31 update-rc.d
 4.0K -rwxrwxrwx  1 root root  1.1K Apr  8  2014 update-usbids
  20K -rwxrwxrwx  1 root root   17K Nov  7  2012 update-xmlcatalog
 4.0K -rwxrwxrwx  1 root root   193 Nov  9  2014 update.sh
 4.0K -rwxrwxrwx  1 root root   191 Nov  9  2014 update_dialer.sh
 4.0K -rwxrwxrwx  1 root root  1.5K May 13  2015 upgrade-from-grub-legacy
 108K -rwxrwxrwx  1 root root  108K Jul 15 15:29 useradd
  76K -rwxrwxrwx  1 root root   75K Jul 15 15:29 userdel
 108K -rwxrwxrwx  1 root root  108K Jul 15 15:29 usermod
  20K -rwxrwxrwx  1 root root   19K Sep  2 14:35 uuidd
 4.0K -rwxrwxrwx  1 root root  1.8K Dec 28  2005 validlocale
 8.0K -rwxrwxrwx  1 root root  6.2K Feb 18  2013 vcstime
    0 lrwxrwxrwx  1 root root     4 Jul 15 15:29 vigr -> vipw
  56K -rwxrwxrwx  1 root root   53K Jul 15 15:29 vipw
 8.0K -rwxrwxrwx  1 root root  7.1K Oct 22  2013 virt-what
 212K -rwxrwxrwx  1 root root  209K Aug 27 15:26 visudo
    0 lrwxrwxrwx  1 root root    37 Nov 27 00:10 vmtoolsd ->
/usr/lib/vmware-tools/sbin64/vmtoolsd
    0 lrwxrwxrwx  1 root root    43 Nov 27 00:10 vmware-checkvm ->
/usr/lib/vmware-tools/sbin64/vmware-checkvm
    0 lrwxrwxrwx  1 root root    43 Nov 27 00:10 vmware-rpctool ->
/usr/lib/vmware-tools/sbin64/vmware-rpctool
 4.0K -rwxrwxrwx  1 root root   634 Nov  9  2014 vmware-sysinfo-lin64.sh
    0 lrwxrwxrwx  1 root root    37 Nov 27 00:10 vmware-vmblock-fuse ->
/usr/lib/vmware-tools/bin64/appLoader
  16K -rwxrwxrwx  1 root root   15K Sep 16  2013 vpddecode
 236K -rwxrwxrwx  1 root root  235K Dec  3 05:25 zdump
 4.0K -rwxrwxrwx  1 root root   270 Nov  9  2014 zerolog.sh
  52K -rwxrwxrwx  1 root root   51K Feb 25  2015 zic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20151210/5bc8755d/attachment.html>


More information about the lxc-users mailing list