Delete seems to follow symlinks


It seems the algorithm for deleting files when cleaning files in the work/.old directory follows symlinks. This is less than excellent when running the agent as root and the symlinks point to let's say /bin or /etc.

One could argue that leaving symlinks in the first place is a bad idea, but it could happen.

We use a system of debootstrap and chroot and some clever symlinking to ensure we get clean environments of the os-version/bitness/architecture we need. In some cases when builds fail we lose important information in the file system of the machine itself.

Is it possible to replace the deletion code by a custom script? That'd probably work for us, as we could then ensure cleanup and do the file deletion in a way we see fit.

1 comment
Comment actions Permalink

Hello Jesper,

TC follows the symlinks, if it cannot delete a directory using native command. Please check that rm -rf .../work/.old/XXX can delete the whole dir.

We have the related request:, please watch/vote for it.


Please sign in to leave a comment.