-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Moving a file to a NAS server triggers an error #373
Comments
Hi @robolth - sorry I don’t want to hijack this thread, but I have a very similar issue, although by the looks of it I’m on v2.4 not v3 - I’m trying to move a txt from one location on a mapped volume to another. All I get is permissions errors (even though both users seem to be in the same group (1000), and both the file & directory have r-w, rwx, r-- permissions. What user, group and permissions do you have on the elements involved in your error ? |
Hi, here are the permissions of my NAS volume: |
Thanks for reporting. I'm struggling reproducing this. Did you find anything strange with the paths shown (I guess |
Thanks for investigating this. They're placeholders, you're right; however I've juste reproduced it with a tailor-made rule and txt file:
These are the real volume and file names and paths: only special character is I don't know why there is a newline and a . in the destination folder, the real path is Edit: as a last test, I also tried to simply move it on the Mac hard drive rather than on the NAS, this time without any issue, so it really seems to be caused by the NAS. |
Can you try moving the files manually using the following script: import argparse
import shutil
from pathlib import Path
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("src", type=Path)
parser.add_argument("dst", type=Path)
parser.add_argument("--simple", action="store_true")
args = parser.parse_args()
src = str(args.src.resolve())
dst = str(args.dst.resolve())
print(f"Moving {src} to {dst}")
if args.simple:
shutil.move(src, dst, copy_function=shutil.copy)
else:
shutil.move(src, dst) Please try both moving methods with Organize uses the same method of moving so that would be super helpful. |
Just tried it: it works with both methods without any issue. |
That’s great! We’re getting closer. Does organize fail on symlinks or symlinked folders? It might be a missing ‘resolve‘ on the target. |
I'm not sure how I can check whether this is the case. Here is a
Does that help? |
Ah so the target is the iCloud Drive folder? Is it failing on both iCloud Drive and the network volume? Did you grant your terminal the permission to read iCloud in your system settings? |
Yes, it's the iCloud Drive folder. It's not failing on the target iCloud Drive subfolder (since it successfully copy files from there to the network volume, and is also able to trash them afterwards). The only problem is on the actual network drive, where it can copy files but not move them. I might be wrong, but I believe the issue is the same as the one depicted here: https://stackoverflow.com/questions/18621577/errno-22-with-python-shutil-and-move-function |
Moving a file to a NAS Server triggers an error. The file is copied, but the original is not removed.
This did not happen with v2.
I believe this is the same issue as in this SO thread: https://stackoverflow.com/questions/18621577/errno-22-with-python-shutil-and-move-function
Output of
organize run
:Please note that the file has been copied to the NAS volume despite the error. The original, however, has not been removed.
organize --version
: organize v3.2.2Your config file
The text was updated successfully, but these errors were encountered: