-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
PermissionError in post-processing #117
Comments
Yeah someone else also encountered this a few days ago. I already know how to fix it, just have to do it. |
It turns out to be more complicated than it originally seemed. Could you share the complete traceback? |
kapowarr-kapowarr-1 | Exception in thread Download Handler: |
kapowarr-kapowarr-1 | During handling of the above exception, another exception occurred: |
Note to reader: On the discord server, the following was discovered:
@azzuron could you explain the weird filepath |
When i mount the path of my file server into the docker container using the volumes i have to provide it a path in the docker container that it will mount to. that path is /comics-1 So in the container where your software runs it tries to write the cbr files to /comics-1/series/volume/file.cbr. I note in the log that chmod might be getting invoked for some reason. I believe that will always fail when the target file is on the NFS mount, at least with Truenas. I am not sure of the details on that but i know i have seen something like that before. kapowarr-kapowarr-1 | lookup("chmod")(dst, mode, follow_symlinks=follow) I would also like to note that the file is placed where it should go so the app does have permission to write to the NFS mountpoint. This error seems to cancel all other operations however so the file in the download folder is not cleaned up and also it seems to block further activity until a restart. |
Yeah so for some reason TrueNAS, SMB (I assume you're mounting using SMB), or Python does not allow changing the permissions of the file (which chmod does). Anything in your TrueNAS config that would restrict changing the permissions? Maybe the docker container runner (prob. root) is not the owner of the file or doesn't have sufficient permissions, so it can't change the permissions? |
It is NFS. The share permissions are 777 so full access. As i mentioned the file can be written you can write and delete. I tested that from CLI in the docker container. There is no need to CHMOD files within docker i guess. You should be knowing the user id of the process accessing the files on the share and have pre-configured appropriate permissions on it prior to mounting. I believe i only have one other container that tries to do this and it also fails but since the permissions are somewhat relaxed and it is able to just fail and continue the app works because it can read/write to the path without issues in the end. |
Running this in a docker container with NFS mounts will seemingly cause the app to crash/get stuck after a download. it will copy the file into the destination and the old file in the download temp path will stay. You get a few errors in the log and the system stops until the docker container is closed out and restarted.
The first error is:
kapowarr-kapowarr-1 | os.rename(src, real_dst) kapowarr-kapowarr-1 | OSError: [Errno 18] Invalid cross-device link: '/downloads/file.cbr' -> '/comics-1/Path/path/file.cbr'
The second error is:
kapowarr-kapowarr-1 | os.rename(src, real_dst) kapowarr-kapowarr-1 | OSError: [Errno 18] Invalid cross-device link: '/downloads/The Walking Dead 193 (2019) (Digital) (Zone-Empire).cbr' -> '/comics-1/Path/path/file.cbr'
To Reproduce
Expected behaviour
The file is moved into the destination and the download temp copy is removed. The app then proceeds to the next file.
Version info
Browser: Firefox 120.0.1
Windows (Kapowarr runs in docker container)
The text was updated successfully, but these errors were encountered: