Client machine is Debian with xrdp installed. /home/rjoyal/thinclient_drives cannot be opened by root, causing backups to fail, despite being excluded.This can also be triggered by an sshfs mount.
/home/rjoyal is included
/home/rjoyal/thinclient_drives is excluded
To replicate without needing xrdp
as a user, not as root:
sshfs user@host testdir
in urbackup, exclude testdir, but make sure /home/user is included
this should cause urbackup to error out when it hits the sshfs mounted folder
in /var/log/urbackup.log I get:
022-08-28 11:47:21: ERROR: Cannot stat “/home/rjoyal/thinclient_drives”: Permission denied (13)
2022-08-28 11:47:21: ERROR: Error while listing files in folder “/home/rjoyal”. User may not have permissions to access this folder. Errno is 0
The error is triggered in urbackupclient/client.cpp in getFilesProxy:
std::vector os_files = getFilesWin
is walking the directory tree, and when it hits the thinclient_files directory, it errors out instead of checking the exclusion list
it looks like the proper fix is to leverage isExcluded and set has_error appropriately.
my hacky workaround:
in urbackupcommon/os_functions_lin.cpp, the lines after
"Log("Cannot stat “”
I keep *has_error at false
when the backups actually run, the exclusion list is checked at that point.
This is in 2.5.19.
https://github.com/uroni/urbackup_backend looks like client.cpp has been substantially rewritten, so I wasn’t sure if it was worth the effort to try and submit a fix for it by parsing the exclusion list. (My first attempt didn’t leverage the existing isExcluded and amatch functions so it didn’t work with globs. The idea was if /some/file/structure failed but /some/file/* was in the exclusion list, to keep going as this was a “fake” error)
FYI: urBackup is fantastic, and I hope I can help make it better.