You are not logged in.

#1 2013-09-23 00:07:03

emphire
Member
From: Canada
Registered: 2007-03-21
Posts: 203

[Solved] Unable to delete directory

I have two directories that I am unable to delete and I was wondering if anyone has any ideas. The directories were created by the extra-i686-build script.

When I try to delete them (as root) it tells me the operation is not permitted. The permissions should allow root to write to them and lsattr doesn't show anything strange. I am running btrfs so I wonder if it's a btrfs bug.

# rm -rf /opt/local/
rm: cannot remove ‘/opt/local/chroot/plexhometheater/root/extra-i686/root’: Operation not permitted
rm: cannot remove ‘/opt/local/chroot/plexhometheater/root/extra-i686/jon’: Operation not permitted

# rmdir /opt/local/chroot/plexhometheater/root/extra-i686/root
rmdir: failed to remove ‘/opt/local/chroot/plexhometheater/root/extra-i686/root’: Operation not permitted

# ls -la /opt/local/chroot/plexhometheater/root/extra-i686/
total 0
drwxr-xr-x 1 root root 14 Sep 22 01:25 ./
drwxr-xr-x 1 root root 20 Sep 22 00:54 ../
drwxr-xr-x 1 root root  0 Sep 22 01:25 jon/
drwxr-xr-x 1 root root  0 Sep 22 01:25 root/

# ls -la /opt/local/chroot/plexhometheater/root/extra-i686/*
/opt/local/chroot/plexhometheater/root/extra-i686/jon:
total 0
drwxr-xr-x 1 root root  0 Sep 22 01:25 ./
drwxr-xr-x 1 root root 14 Sep 22 01:25 ../

/opt/local/chroot/plexhometheater/root/extra-i686/root:
total 0
drwxr-xr-x 1 root root  0 Sep 22 01:25 ./
drwxr-xr-x 1 root root 14 Sep 22 01:25 ../

# lsattr /opt/local/chroot/plexhometheater/root/extra-i686/
---------------- /opt/local/chroot/plexhometheater/root/extra-i686/root
---------------- /opt/local/chroot/plexhometheater/root/extra-i686/jon

# grep opt /etc/mtab
/dev/sda3 /opt btrfs rw,relatime,compress=lzo,space_cache 0 0

Last edited by emphire (2013-09-24 04:55:28)

Offline

#2 2013-09-23 01:10:22

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [Solved] Unable to delete directory

I can't recall the details of this but if I run lsattr on a bunch of directories, I get

----------I--e-- /etc
-------------e-- /boot
-------------e-- /usr

for example and not all dashes.

EDIT: Ignore this: It is because I'm using ext4.

Last edited by cfr (2013-09-23 01:11:42)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2013-09-23 07:44:40

mr.MikyMaus
Member
From: disabled
Registered: 2006-03-31
Posts: 285

Re: [Solved] Unable to delete directory

(never mind, can't read)

Last edited by mr.MikyMaus (2013-09-23 07:45:28)


What happened to Arch's KISS? systemd sure is stupid but I must have missed the simple part ...

... and who is general Failure and why is he reading my harddisk?

Offline

#4 2013-09-23 08:03:48

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,541

Re: [Solved] Unable to delete directory

Not a bug. It can't delete them because they're not directories, they're subvolumes. Use "btrfs subvolume delete <name>".

Offline

#5 2013-09-24 04:55:04

emphire
Member
From: Canada
Registered: 2007-03-21
Posts: 203

Re: [Solved] Unable to delete directory

Perfect. Thanks Scimmia!

Offline

Board footer

Powered by FluxBB