1

I am trying to run clean jenkins workspace with rm -rf /var/lib/jenkins/workspace/* but I get permission denied for /var/lib/jenkins/workspace/*

I see jenkins jenkins when I execute ll to check which user is owner of these file

Where is my mistake?

Dave M
  • 4,514
  • 22
  • 31
  • 30
J.dock
  • 11
  • 1
  • 1
    The typical `ll` alias for the `ls` command doesn't include the ls `-a` switch to display hidden files. There may be "hidden" files or files deeper in the directory tree owned by another user that cause the permission denied error. `find /var/lib/jenkins/workspace -ls` might be convenienyt to list all files – HBruijn May 31 '19 at 07:40
  • 1
    Check the permission of the directory as well. To delete files from a directory, you need to have write access for the directory itself (in your case, you need to be able to write the `/var/lib/jenkins/workspace/` directory). – Lacek May 31 '19 at 08:42

0 Answers0