uploaded Avatar not found #243

Closed
opened 2025-11-01 20:51:47 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @Tuphal on GitHub (Jul 2, 2024).

Description

I updated from v0.23 to v0.24.0 without issues.
Only one minor thing was seen: My uploaded Avatar was gone:
grafik

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

Originally created by @Tuphal on GitHub (Jul 2, 2024). ### Description I updated from v0.23 to v0.24.0 without issues. Only one minor thing was seen: My uploaded Avatar was gone: ![grafik](https://github.com/go-vikunja/vikunja/assets/42291781/30980ddf-fca0-4fa1-96e1-87058e2e5689) 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_
Author
Owner

@kolaente commented on GitHub (Jul 2, 2024):

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?

@kolaente commented on GitHub (Jul 2, 2024): > 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?
Author
Owner

@Tuphal commented on GitHub (Jul 3, 2024):

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?

@Tuphal commented on GitHub (Jul 3, 2024): 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?
Author
Owner

@kolaente commented on GitHub (Jul 4, 2024):

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

@kolaente commented on GitHub (Jul 4, 2024): > 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
Author
Owner

@kolaente commented on GitHub (Jan 22, 2025):

Closing as inactive, please ping or open a new issue with relevant information if you still have this problem.

@kolaente commented on GitHub (Jan 22, 2025): Closing as inactive, please ping or open a new issue with relevant information if you still have this problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#243