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
As described in #178, there are cases when fchmod consistently fails for a particular filesystem. This causes copy_file failure, although the file is successfully copied, though without setting the original access mode and permissions. It may be desirable to suppress the error from copy_file if fchmod fails.
One possible solution is to add a new flag in copy_options to ignore errors from fchmod.
Side note: It may be worthwhile to detect NFS with statfs (for it f_type should be NFS_SUPER_MAGIC) and only set S_IWUSR permission when the target file is on NFS. This way we may not have to change the target file permissions after copying. Although, if a filesystem does not support fchmod, it is possible that fstat/statx for the target file returns a different mode from the original file, which means we will try calling fchmod anyway.
The text was updated successfully, but these errors were encountered:
As described in #178, there are cases when
fchmod
consistently fails for a particular filesystem. This causescopy_file
failure, although the file is successfully copied, though without setting the original access mode and permissions. It may be desirable to suppress the error fromcopy_file
iffchmod
fails.One possible solution is to add a new flag in
copy_options
to ignore errors fromfchmod
.Side note: It may be worthwhile to detect NFS with
statfs
(for itf_type
should beNFS_SUPER_MAGIC
) and only setS_IWUSR
permission when the target file is on NFS. This way we may not have to change the target file permissions after copying. Although, if a filesystem does not supportfchmod
, it is possible thatfstat
/statx
for the target file returns a different mode from the original file, which means we will try callingfchmod
anyway.The text was updated successfully, but these errors were encountered: