Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   Problem with removing a chroot (http://www.linux-archive.org/debian-user/129887-problem-removing-chroot.html)

Ryan Klein 07-23-2008 02:43 AM

Problem with removing a chroot
 
I am having a problem removing the remains of a chroot; I used the
script in /usr/share/doc/libpam-chroot/examples/ and it created hard
links for the entire /proc folder in /var/chroot/user/testuser/proc/ and
I cannot remove it. Can someone let me know how to remove these hard
links so that I can remove /var/chroot/users/*? Thanks.


Regards,

Ryan Klein


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Shachar Or 07-23-2008 04:51 AM

Problem with removing a chroot
 
On Wednesday 23 July 2008 05:43, Ryan Klein wrote:
> I am having a problem removing the remains of a chroot; I used the
> script in /usr/share/doc/libpam-chroot/examples/ and it created hard
> links for the entire /proc folder in /var/chroot/user/testuser/proc/ and
> I cannot remove it. Can someone let me know how to remove these hard
> links so that I can remove /var/chroot/users/*? Thanks.

Perhaps something like 'find /chroot -type l | xargs unlink' would help.
>
> Regards,
>
> Ryan Klein

--
Shachar Or | שחר אור
http://ox.freeallweb.org/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Kevin Buhr 07-23-2008 05:56 PM

Problem with removing a chroot
 
Ryan Klein <ryan@ryanklein.com> writes:
>
> I am having a problem removing the remains of a chroot; I used the
> script in /usr/share/doc/libpam-chroot/examples/ and it created hard
> links for the entire /proc folder in /var/chroot/user/testuser/proc/
> and I cannot remove it. Can someone let me know how to remove these
> hard links so that I can remove /var/chroot/users/*?

Actually, you've probably got another copy of "proc" mounted there.
Try "umount /var/chroot/user/testuser/proc", and see if that fixes
things up.

It's not possible to create hardlinks across different filesystems, so
in particular you can't create hardlinks to "/proc" files in your real
filesystem. (Try it, and you'll get an "Invalid cross-device link"
error or something similar.)

--
Kevin <buhr+debian@asaurus.net>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


All times are GMT. The time now is 06:28 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.