9001 / 9001/copyparty

`Permission denied: b'/.hist'` when viewing image thumbnails from root directory

オープン
#273 コメント 3 件 リアクション 0 件 担当者 1 名 @9001 が担当を希望しています GitHub で見る
bug
主要言語
Python
スター
46.6k
フォーク
1.9k
平均マージ
10日 16時間
マージ済み PR(30日)
5

説明

### Describe the bug
When I launch copyparty from my root directory and navigate to a subdirectory I have images in, the thumbnail HTTP requests receive 500 responses and so no thumbnails are shown in the browser.

For each requested thumbnail, the terminal logs:
```
11:47:10.097 192.168.0.13 36008 http500: bos.py:30 : os.makedirs(bname, mode)
:218 :
:218 :
:218 :
:218 :
:218 :
:228 :
[PermissionError] [Errno 13] Permission denied: b'/.hist', '/home/oboro/nagito/1750018310.png'
```
which I suppose means that `.hist` is required to store thumbnails, and since my user doesn't have write permissions to the root directory, it fails

### To Reproduce
```
cd /
copyparty
# navigate to /home/user/images/your_image_dir in the copyparty frontend
# no thumbnails are displayed
```

### Expected behavior
I expect I can still see thumbnails, through more graceful behaviour, like temporarily storing thumbnails in memory or in a temp dir if `.hist` isn't able to be written. Alternatively:
- A check on startup with a log message making it clear that images won't be available, citing that I don't have write permissions in the working directory.
- Some sort of visual feedback in the web UI telling me what's wrong
- etc.

### Server details (if you're NOT using docker/podman)
- Arch Linux
- official Arch package `copyparty 1.18.2-1`
```
copyparty v1.18.2 "logtail" (2025-07-07)
CPython v3.13.5 on Linux64 [GCC 15.1.1 20250425]
sqlite 3.50.3*1 | jinja 3.1.6 | pyftpd (None) | tftp (None)
```

### Client details
The client sees receives a 500 HTTP response for the thumbnail request, so it's not a browser issue

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。