Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Apr 2020 13:22:07 -0700
From:      Michael Sierchio <kudzu@tenebras.com>
To:        Graham Perrin <grahamperrin@gmail.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Can't remove files from a directory that was partially used by a jail
Message-ID:  <CAHu1Y71qBMVFNMA0sntTEyKZ%2BEVkw7J4c6tS1mOrHdHZXTRTKw@mail.gmail.com>
In-Reply-To: <22daa8dc-cb20-6b08-b85f-161e6aca06ec@gmail.com>
References:  <22daa8dc-cb20-6b08-b85f-161e6aca06ec@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
ls -Rlo

recursive listing showing flags

or, just apply the hammer,

chflags -R 0 <dir>


On Fri, Apr 10, 2020 at 11:02 AM Graham Perrin <grahamperrin@gmail.com>
wrote:

> Below, I can't remove files to make way for (re)creation of a jail.
>
> Any suggestions?
>
> If it helps: at some point a few hours ago I might have accidentally
> begun (then cancelled) a bulk operation whilst using a different boot
> environment; the build began with a warning about the jail being newer
> than the host.
>
>
> root@momh167-gjp4-8570p:~ # poudriere jail -c -j head -v head -a amd64
> -m src=3D/usr/src
> [00:00:00] Error: Directory /usr/local/poudriere/jails/head already exist=
s
> root@momh167-gjp4-8570p:~ # poudriere jail -l
> JAILNAME VERSION ARCH METHOD TIMESTAMP PATH
> root@momh167-gjp4-8570p:~ # rm -rf /usr/local/poudriere/jails/head
> rm: /usr/local/poudriere/jails/head/libexec/ld-elf32.so.1: Operation not
> permitted
> rm: /usr/local/poudriere/jails/head/libexec/ld-elf.so.1: Operation not
> permitted
> rm: /usr/local/poudriere/jails/head/libexec: Directory not empty
> rm: /usr/local/poudriere/jails/head/sbin/init: Operation not permitted
> rm: /usr/local/poudriere/jails/head/sbin: Directory not empty
> rm: /usr/local/poudriere/jails/head/var/empty: Operation not permitted
> rm: /usr/local/poudriere/jails/head/var: Directory not empty
> rm: /usr/local/poudriere/jails/head/usr/lib32/libthr.so.3: Operation not
> permitted
> rm: /usr/local/poudriere/jails/head/usr/lib32/librt.so.1: Operation not
> permitted
> rm: /usr/local/poudriere/jails/head/usr/lib32/libcrypt.so.5: Operation
> not permitted
> rm: /usr/local/poudriere/jails/head/usr/lib32/libc.so.7: Operation not
> permitted
> rm: /usr/local/poudriere/jails/head/usr/lib32: Directory not empty
> rm: /usr/local/poudriere/jails/head/usr/bin/login: Operation not permitte=
d
> rm: /usr/local/poudriere/jails/head/usr/bin/crontab: Operation not
> permitted
> rm: /usr/local/poudriere/jails/head/usr/bin/opiepasswd: Operation not
> permitted
> rm: /usr/local/poudriere/jails/head/usr/bin/chpass: Operation not permitt=
ed
> rm: /usr/local/poudriere/jails/head/usr/bin/opieinfo: Operation not
> permitted
> rm: /usr/local/poudriere/jails/head/usr/bin/passwd: Operation not permitt=
ed
> rm: /usr/local/poudriere/jails/head/usr/bin/su: Operation not permitted
> rm: /usr/local/poudriere/jails/head/usr/bin: Directory not empty
> rm: /usr/local/poudriere/jails/head/usr/lib/librt.so.1: Operation not
> permitted
> rm: /usr/local/poudriere/jails/head/usr/lib: Directory not empty
> rm: /usr/local/poudriere/jails/head/usr: Directory not empty
> rm: /usr/local/poudriere/jails/head/lib/libcrypt.so.5: Operation not
> permitted
> rm: /usr/local/poudriere/jails/head/lib/libc.so.7: Operation not permitte=
d
> rm: /usr/local/poudriere/jails/head/lib/libthr.so.3: Operation not
> permitted
> rm: /usr/local/poudriere/jails/head/lib: Directory not empty
> rm: /usr/local/poudriere/jails/head: Directory not empty
> root@momh167-gjp4-8570p:~ # rm
> /usr/local/poudriere/jails/head/libexec/ld-elf32.so.1
> override r-xr-xr-x root/wheel schg for
> /usr/local/poudriere/jails/head/libexec/ld-elf32.so.1? y
> rm: /usr/local/poudriere/jails/head/libexec/ld-elf32.so.1: Operation not
> permitted
> root@momh167-gjp4-8570p:~ # zfs list
> NAME                                           USED  AVAIL  REFER
> MOUNTPOINT
> copperbowl                                     312G   122G    88K
> /copperbowl
> copperbowl/ROOT                               94.8G   122G    88K none
> copperbowl/ROOT/Waterfox                       314M   122G  59.3G  /
> copperbowl/ROOT/r357746g                      1.22M   122G  59.8G  /
> copperbowl/ROOT/r357746h                      1.37M   122G  60.0G  /
> copperbowl/ROOT/r359628c                      19.1G   122G  60.9G  /
> copperbowl/ROOT/r359750a                      1.37M   122G  61.4G  /
> copperbowl/ROOT/r359750b                      75.0G   122G  60.7G  /
> copperbowl/ROOT/r359750c                       392M   122G  62.7G  /
> copperbowl/iocage                             4.35G   122G  3.68M
> /copperbowl/iocage
> copperbowl/iocage/download                     359M   122G    88K
> /copperbowl/iocage/download
> copperbowl/iocage/download/12.0-RELEASE        359M   122G   359M
> /copperbowl/iocage/download/12.0-RELEASE
> copperbowl/iocage/images                        88K   122G    88K
> /copperbowl/iocage/images
> copperbowl/iocage/jails                       2.75G   122G    88K
> /copperbowl/iocage/jails
> copperbowl/iocage/jails/jbrowsers             2.75G   122G    92K
> /copperbowl/iocage/jails/jbrowsers
> copperbowl/iocage/jails/jbrowsers/root        2.75G   122G  3.99G
> /copperbowl/iocage/jails/jbrowsers/root
> copperbowl/iocage/log                          100K   122G   100K
> /copperbowl/iocage/log
> copperbowl/iocage/releases                    1.24G   122G    88K
> /copperbowl/iocage/releases
> copperbowl/iocage/releases/12.0-RELEASE       1.24G   122G    88K
> /copperbowl/iocage/releases/12.0-RELEASE
> copperbowl/iocage/releases/12.0-RELEASE/root  1.24G   122G  1.24G
> /copperbowl/iocage/releases/12.0-RELEASE/root
> copperbowl/iocage/templates                     88K   122G    88K
> /copperbowl/iocage/templates
> copperbowl/poudriere                          29.6G   122G    88K
> /copperbowl/poudriere
> copperbowl/poudriere/data                     1.92G   122G    96K
> /usr/local/poudriere/data
> copperbowl/poudriere/data/.m                    88K   122G    88K
> /usr/local/poudriere/data/.m
> copperbowl/poudriere/data/cache                 88K   122G    88K
> /usr/local/poudriere/data/cache
> copperbowl/poudriere/data/logs                1.48G   122G  1.48G
> /usr/local/poudriere/data/logs
> copperbowl/poudriere/data/packages             446M   122G   446M
> /usr/local/poudriere/data/packages
> copperbowl/poudriere/data/wrkdirs               88K   122G    88K
> /usr/local/poudriere/data/wrkdirs
> copperbowl/poudriere/jails                      88K   122G    88K
> /copperbowl/poudriere/jails
> copperbowl/poudriere/ports                    27.7G   122G    88K
> /copperbowl/poudriere/ports
> copperbowl/poudriere/ports/default            27.7G   122G  27.7G
> /usr/local/poudriere/ports/default
> copperbowl/tmp                                 456K   122G   456K /tmp
> copperbowl/usr                                 179G   122G    88K /usr
> copperbowl/usr/home                            175G   122G   159G /usr/ho=
me
> copperbowl/usr/ports                          1.90G   122G  1.90G
> /usr/ports
> copperbowl/usr/src                            2.09G   122G  2.09G /usr/sr=
c
> copperbowl/var                                4.65G   122G    88K /var
> copperbowl/var/audit                            88K   122G    88K
> /var/audit
> copperbowl/var/crash                          1.27M   122G  1.27M
> /var/crash
> copperbowl/var/log                            14.5M   122G  14.5M /var/lo=
g
> copperbowl/var/mail                            128K   122G   128K /var/ma=
il
> copperbowl/var/tmp                            4.64G   122G  4.64G /var/tm=
p
> root@momh167-gjp4-8570p:~ #
>
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscribe@freebsd.org"
>


--=20

"Well," Brahm=C4=81 said, "even after ten thousand explanations, a fool is =
no
wiser, but an intelligent person requires only two thousand five hundred."

- The Mah=C4=81bh=C4=81rata



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHu1Y71qBMVFNMA0sntTEyKZ%2BEVkw7J4c6tS1mOrHdHZXTRTKw>