diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index b7a47b6a4c..fbe4ad648b 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -744,6 +744,10 @@ def _copy_dir(self, srcpath): path = os.path.join(srcpath, name) self._do_copy_path(path) except OSError as e: + if e.errno == errno.EPERM or errno.EACCES: + msg = "Permission denied" + self._log_warn("_copy_dir: '%s' %s" % (srcpath, msg)) + return if e.errno == errno.ELOOP: msg = "Too many levels of symbolic links copying" self._log_error("_copy_dir: %s '%s'" % (msg, srcpath))