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

Kevin Holly openvz at lists.dedilink.eu
Tue Aug 20 22:48:06 EDT 2013


On 08/20/2013 06:23 PM, Kir Kolyshkin wrote:
> On 08/20/2013 08:22 AM, Kevin Holly wrote:
>> 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': Permission denied
>>>> find: cannot delete `./lib/libsh.so/shhk.pub': Permission denied
>>>> find: cannot delete `./lib/libsh.so/bash': Permission denied
>>>> find: cannot delete `./lib/libsh.so/shrs': Permission denied
>>>> find: cannot delete `./lib/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?
>>
> 
> I am not really sure what to do.
> 
> From one side, destroy is destroy and should work nevertheless.
> 
> From another side, if immutable attribute is set, it was done for a reason.
Yeah, but if you want to destroy the container, it is for the reason,
you don't want to have the data anymore and therefor it should still be
deleted.
Same scenario when destroying a hard drive: If you destroy it, it is for
a good reason, whatever bit is set on any filesystem on the disk :)

> Plus, chattr -R -i on /vz/private/NNN itself takes a few seconds, it's
> kinda
> long operation to perform "just in case".
This time it was the +a bit set. Weird...

[root at glowstone vztmp]# lsattr -R .
-------------e- ./vzctl-rm-me.L8IBqk

./vzctl-rm-me.L8IBqk:
-------------e- ./vzctl-rm-me.L8IBqk/sbin

./vzctl-rm-me.L8IBqk/sbin:
-u---a-------e- ./vzctl-rm-me.L8IBqk/sbin/syslogd

-------------e- ./vzctl-rm-me.L8IBqk/etc

./vzctl-rm-me.L8IBqk/etc:
s----a-------e- ./vzctl-rm-me.L8IBqk/etc/ld.so.hash

-------------e- ./vzctl-rm-me.L8IBqk/usr

./vzctl-rm-me.L8IBqk/usr:
-------------e- ./vzctl-rm-me.L8IBqk/usr/sbin

./vzctl-rm-me.L8IBqk/usr/sbin:
-u---a-------e- ./vzctl-rm-me.L8IBqk/usr/sbin/kfd

-u---a-------e- ./vzctl-rm-me.L8IBqk/usr/secure


[root at glowstone vztmp]# chattr -R -a vzctl-rm-me.L8IBqk/
[root at glowstone vztmp]# find -delete


> 
> So, I think, such cases should be resolved manually, i.e. by running
> chattr -R -i
> _______________________________________________
> 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