You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this actually affects anything other than creating ugly error messages in the log every time the scheduled backup runs. But it seems like the chmod_func fails with error "Permission denied" every time a backup has been created and copied to my download_path, which is a mounted samba share.
Is it really necessary to copy all permission bits to the download_path? It seems like if shutil.copyfile would be used instead of shutil.copy then it wouldn't try to run chmod_func and it wouldn't generate any error messages.
When I try to run chmod or chown on any files on the mounted share as root it doesn't generate any errors but also nothing at all happens. The owner user and group and permissions on all files are controlled by options in /etc/fstab and it's not possible to change on any file or folder on the share.
Yeah, that makes sense I think I was actually planning to use shutil.copy2 to preserve metadata as well but had no idea that would cause errors on samba shares. I'd expect it to fail gracefully when the platform doesn't support it.
As you said there's no real reason to copy the permission bits so I'll switch it to shutil.copyfile.
Not sure if this actually affects anything other than creating ugly error messages in the log every time the scheduled backup runs. But it seems like the chmod_func fails with error "Permission denied" every time a backup has been created and copied to my download_path, which is a mounted samba share.
Is it really necessary to copy all permission bits to the download_path? It seems like if shutil.copyfile would be used instead of shutil.copy then it wouldn't try to run chmod_func and it wouldn't generate any error messages.
See: https://stackoverflow.com/questions/11835833/why-would-shutil-copy-raise-a-permission-exception-when-cp-doesnt
When I try to run chmod or chown on any files on the mounted share as root it doesn't generate any errors but also nothing at all happens. The owner user and group and permissions on all files are controlled by options in /etc/fstab and it's not possible to change on any file or folder on the share.
The text was updated successfully, but these errors were encountered: