[Users] "Permission denied" when trying to help a stuck destroy

Kevin Holly openvz at lists.dedilink.eu
Tue Aug 20 22:43:18 EDT 2013


On 08/20/2013 05:49 PM, spameden wrote:
> Obviously your system is compromised.
> 
> 
> I suggest reinstalling whole container / check host system as well and
> other servers if you had same passwords in use.
When i'm doing a destroy, i'm doing it for the reason, it should be
deleted. As root in the container, you're able to just set the +i bit
and "break" the destroy post-deletion of the container.


(Testcase done in a container)

root at fwd1:~# touch testfile
root at fwd1:~# chattr +i testfile
root at fwd1:~# rm testfile
rm: remove regular empty file `testfile'? y
rm: cannot remove `testfile': Operation not permitted
root at fwd1:~# chattr -i testfile
root at fwd1:~# rm testfile
rm: remove regular empty file `testfile'? y
root at fwd1:~#


> 
> 
> 2013/8/20 Kevin Holly <openvz at lists.dedilink.eu
> <mailto:openvz at lists.dedilink.eu>>
> 
>     On 06/11/2013 08:00 PM, Kir Kolyshkin wrote:
>     > On 06/11/2013 02:33 AM, Kevin Holly wrote:
>     >> Hello,
>     >>
>     >> i already had this problem but forgot how to fix it:
>     >>
>     >> vztmp-Directory contains parts of a 3 month old container, which was
>     >> destroyed. When i try to "find -delete" the directory, i get:
>     >>
>     >> [root at bedrock vzctl-rm-me.guj6L7]# find -delete
>     >> find: cannot delete `./usr/lib/libsh/shsb': Permission denied
>     >> find: cannot delete `./usr/lib/libsh/utilz': Permission denied
>     >> find: cannot delete `./usr/lib/libsh/.owned': Permission denied
>     >> find: cannot delete `./usr/lib/libsh/.sniff': Permission denied
>     >> find: cannot delete `./usr/lib/libsh/.backup': Permission denied
>     >> find: cannot delete `./usr/lib/libsh/.bashrc': Permission denied
>     >> find: cannot delete `./usr/lib/libsh/hide': Permission denied
>     >> find: cannot delete `./usr/lib/libsh': Operation not permitted
>     >> find: cannot delete `./usr/lib': Directory not empty
>     >> find: cannot delete `./usr': Directory not empty
>     >> find: cannot delete `./lib/libsh.so/shhk <http://libsh.so/shhk>':
>     Permission denied
>     >> find: cannot delete `./lib/libsh.so/shhk.pub
>     <http://libsh.so/shhk.pub>': Permission denied
>     >> find: cannot delete `./lib/libsh.so/bash <http://libsh.so/bash>':
>     Permission denied
>     >> find: cannot delete `./lib/libsh.so/shrs <http://libsh.so/shrs>':
>     Permission denied
>     >> find: cannot delete `./lib/libsh.so/shdcf
>     <http://libsh.so/shdcf>': Permission denied
>     >> find: cannot delete `./lib/libsh.so': Operation not permitted
>     >> find: cannot delete `./lib': Directory not empty
>     >> find: cannot delete `./sbin/ttymon': Operation not permitted
>     >> find: cannot delete `./sbin/ttyload': Operation not permitted
>     >> find: cannot delete `./sbin/ifconfig': Operation not permitted
>     >> find: cannot delete `./sbin': Directory not empty
>     >> find: cannot delete `./etc/sh.conf': Operation not permitted
>     >> find: cannot delete `./etc': Directory not empty
>     >>
>     >> lsattr shows this:
>     >>
>     >> [root at bedrock vzctl-rm-me.guj6L7]# lsattr etc/sh.conf
>     >> s---ia-------e- etc/sh.conf
>     >>
>     >> Anyone knows how to fix this/set the right (ch)attr?
>     >
>     > Something like "chattr -R -i" should work. I should probably add it to
>     > vzctl destroy.
>     Is it already in one of the stable releases or planned or do you still
>     consider if it's a good idea to put it there?
>     >
>     > _______________________________________________
>     > Users mailing list
>     > Users at openvz.org <mailto:Users at openvz.org>
>     > https://lists.openvz.org/mailman/listinfo/users
> 
>     --
>     Best regards
> 
>     Kevin Holly - root at hallowe.lt <mailto:root at hallowe.lt> -
>     http://hallowe.lt/
>     _______________________________________________
>     Users mailing list
>     Users at openvz.org <mailto:Users at openvz.org>
>     https://lists.openvz.org/mailman/listinfo/users
> 
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at openvz.org
> https://lists.openvz.org/mailman/listinfo/users
> 

-- 
Best regards

Kevin Holly - root at hallowe.lt - http://hallowe.lt/


More information about the Users mailing list