uploaded Avatar not found
Opened this issue · 3 comments
Description
I updated from v0.23 to v0.24.0 without issues.
Only one minor thing was seen: My uploaded Avatar was gone:
When opening the image in a new tab I get "Internal Server Error" with following link:
https://todo.DOMAIN.COM/api/v1/avatar/readily-tender-sawfly?size=50&=1719944689649
It seems there is some "id" missig before "=1719944689649"
The log shows:
2024-07-02T18:21:49.281926192Z 2024-07-02T18:21:49.281787159Z: ERROR ▶ v1/GetAvatar 36a Error getting avatar for user 2: open files/1: no such file or directory
2024-07-02T18:21:49.281957395Z 2024-07-02T18:21:49.281818201Z: ERROR ▶ v1/GetAvatar 36b open files/1: no such file or directory
When trying to upload a new avatar, I get also an "Internal Server Error" with following error in the log:
2024-07-02T18:22:25.987756491Z 2024-07-02T18:22:25.987526032Z: ERROR ▶ files/Delete 378 Error deleting file 1: %!w(*fs.PathError=&{remove files/1 2})
2024-07-02T18:22:26.330489749Z 2024-07-02T18:22:26.330339636Z: ERROR ▶ v1/UploadAvatar 37a mkdir files/: permission denied
I then changed the mounted folder premissions from 755 to 777. Still the same owner/group 1000:1000.
When trying to upload again, I only get this log:
2024-07-02T18:29:40.071678732Z 2024-07-02T18:29:40.07156072Z: ERROR ▶ v1/UploadAvatar 1e0 mkdir files/: permission denied
I'm running Vikunja in Docker. In v0.23.0 it worked with the avatar.
Did some premissions change? In the changelog are no informations regarding possible changes in premissions.
As written: just a minor inconvenience. Thanks for the great software :)
Sidenote: Vikunja is the only container of my 20 services, which has the timestamp two times in the log.
Vikunja Version
0.24
Browser and version
Firefox 126.0.1
Can you reproduce the bug on the Vikunja demo site?
No
Screenshots
No response
It seems there is some "id" missig before "=1719944689649"
Your username is in the url, that's what it uses to figure out which avatar to serve.
Does the files volume have the appropriate permissions, as outlined in the docs? https://vikunja.io/docs/installing#docker
Did you change the user Vikunja is running as?
I had set the ROOTPATH in the environment variables and only mapped this one folder:
...
VIKUNJA_SERVICE_ROOTPATH: /vikunja
VIKUNJA_DATABASE_PATH: /vikunja/vikunja.db
volumes:
- /docker-data/vikunja/vikunja_data:/vikunja
...
I can see the config.yaml and vikunja.db files.
Config is used, because my OpenID is working.
As said, in v0.23.0 I could change/upload my avatar.
I now added the files path as written in your config.
- /docker-data/vikunja/vikunja-files:/app/vikunja/files
Now I can upload the avatar and it is shown.
Why is "ROOTPATH" not including the file-directory?
Why is "ROOTPATH" not including the file-directory?
Good question, I guess I never really thought about that. I admit it makes sense, added an item to the backlog.
In the meantime, you can change the basepath for the files directory to be a subdirectory of the rootpath: https://vikunja.io/docs/config-options#files