def validpath(self, path): """Check that user is allowed inside path checking against configured chroot_exceptions and built-in hidden paths. """ daemon_conf = configuration.daemon_conf try: get_fs_path(path, daemon_conf['root_dir'], daemon_conf['chroot_exceptions']) logger.debug("accepted access to %s" % path) return True except ValueError: logger.error("rejected access to %s" % path) return False