Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding a flag for ignoring fchmod errors in copy_file #179

Closed
Lastique opened this issue Mar 20, 2021 · 3 comments
Closed

Consider adding a flag for ignoring fchmod errors in copy_file #179

Lastique opened this issue Mar 20, 2021 · 3 comments

Comments

@Lastique
Copy link
Member

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.

@kkumar45
Copy link

@Lastique: Any update on it, when it will be planned?

@Lastique
Copy link
Member Author

No updates, unfortunately. I haven't got around to it.

@kkumar45
Copy link

@Lastique Can you please consider it? Our customers are impacted due to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants