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

"Invalid cross-device link" for docker in windows 11 in external drive #3283

Open
XiaosongWen opened this issue Jan 13, 2025 · 0 comments
Open

Comments

@XiaosongWen
Copy link

Describe the bug/problem
Recently I got an Seagate - External Desktop Hard Drive to extend storage of my PC. When I tried to host calibre-web on docker, I got OSError: [Errno 18] Invalid cross-device link:
I also found this issue: #3150, but using nightly did not resolve this problem

To Reproduce
My folder structure is :

D:\Apps\calibre\
├── docker-compose.yml
├── config\
└── library\

and my docker-compose is :

services:
  calibre-web:
    image: linuxserver/calibre-web:nightly
    container_name: calibre-web
    environment:
      - PUID=1000                 # User ID
      - PGID=1000                 # Group ID
      - TZ=Etc/UTC                # Time zone
      - DOCKER_MODS=linuxserver/mods:universal-calibre #optional
      - OAUTHLIB_RELAX_TOKEN_SCOPE=1 #optional
    volumes:
      - ./config:/config  # Configuration storage for Calibre-Web
      - ./library:/library            # Shared library with Calibre
    ports:
      - 18083:8083                 # Port for Calibre-Web interface
    restart: unless-stopped

Logfile

[2025-01-13 01:39:40,553] DEBUG {cps.uploader:275} Temporary file: /tmp/calibre_web/1245053e95693f81540529804b5dc4d6
[2025-01-13 01:39:41,692] ERROR {cps.helper:533} Rename title from /tmp/calibre_web/1245053e95693f81540529804b5dc4d6 to /library/Timothy Barnosky/AWS-Certified-Cloud-Practitioner_Exam-Guide (2) failed with error, trying to move without metadata
[2025-01-13 01:39:41,734] ERROR {cps.helper:557} Rename title from /tmp/calibre_web/1245053e95693f81540529804b5dc4d6 to /library/Timothy Barnosky/AWS-Certified-Cloud-Practitioner_Exam-Guide (2) failed with error: [Errno 1] Operation not permitted: '/library/Timothy Barnosky/AWS-Certified-Cloud-Practitioner_Exam-Guide (2)/AWS-Certified-Cloud-Practitioner_Exam-Guide.pdf'
Traceback (most recent call last):
  File "/usr/lib/python3.12/shutil.py", line 886, in move
    os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: '/tmp/calibre_web/1245053e95693f81540529804b5dc4d6' -> '/library/Timothy Barnosky/AWS-Certified-Cloud-Practitioner_Exam-Guide (2)/AWS-Certified-Cloud-Practitioner_Exam-Guide.pdf'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/calibre-web/cps/helper.py", line 531, in move_files_on_change
    shutil.move(original_filepath, os.path.join(new_path, db_filename))
  File "/usr/lib/python3.12/shutil.py", line 906, in move
    copy_function(src, real_dst)
  File "/usr/lib/python3.12/shutil.py", line 476, in copy2
    copystat(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.12/shutil.py", line 384, in copystat
    lookup("utime")(dst, ns=(st.st_atime_ns, st.st_mtime_ns),
PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.12/shutil.py", line 886, in move
    os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: '/tmp/calibre_web/1245053e95693f81540529804b5dc4d6' -> '/library/Timothy Barnosky/AWS-Certified-Cloud-Practitioner_Exam-Guide (2)/AWS-Certified-Cloud-Practitioner_Exam-Guide.pdf'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/calibre-web/cps/helper.py", line 535, in move_files_on_change
    shutil.move(original_filepath, os.path.join(new_path, db_filename), copy_function=shutil.copy)
  File "/usr/lib/python3.12/shutil.py", line 906, in move
    copy_function(src, real_dst)
  File "/usr/lib/python3.12/shutil.py", line 436, in copy
    copymode(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.12/shutil.py", line 317, in copymode
    chmod_func(dst, stat.S_IMODE(st.st_mode))
PermissionError: [Errno 1] Operation not permitted: '/library/Timothy Barnosky/AWS-Certified-Cloud-Practitioner_Exam-Guide (2)/AWS-Certified-Cloud-Practitioner_Exam-Guide.pdf'
[2025-01-13 01:39:41,939] DEBUG {cps.services.worker:91} Add Task for user: admin - Upload AWS-Certified-Cloud-Practitioner_Exam-Guide

I am able to upload file via calibre and open via web. But unable to upload via web.

Environment (please complete the following information):

  • OS: windows 11
  • Python version: 3.12.3 (main, Nov 6 2024, 18:32:19) [GCC 13.2.0]
  • Calibre-Web version: 0.6.25 Beta
  • Docker container: linuxserver/calibre-web:nightly
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

1 participant