Comments (13)
While the docker daemon runs as root, Vikunja itself does not. Vikunja runs as 1000:1000
so if it wants to store files somewhere they have to be accessible to that user. I think you got the gist of it 🙂
There's a bit more info about docker's permission model here: https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user
I'm going to close this issue as your problem got resolved. Feel free to open a new one if you have other issues or check out the forum.
from vikunja.
Sir, I am sorry for my bad English and my bad expression, "try" is try, it is your website, so I could not know the server logs.
Nothing to worry about, I'm not a native english speaker myself so I know that very well 🙂
I've looked at the list and task you created on try and the attachment was uploaded just fine. I can access it when clicking on it in the list, embedding works as well when adding a !
in front of the generated markdown code when uploading through the editor (That's an upstream bug in the editor itself).
Sir, I followed your instruct, and I update all vikunja images(vikunja/api:latest + vikunja/frontend:latest) and the issue still exists;
The configuration looks fine to me. It looks like you're able to access the frontend and upload files even though uploading itself fails. That means the caddy configuration is working fine.
About the permission error: The files folder you mounted to store the attachments (and other things) needs to be accessible to the user and group with the id 1000 for Vikunja to have access to it. Try running chown 1000:1000 ./files -R
in the directory where the compose file is stored. After that, restart the container and try uploading an attachment again.
You can could change the uid and gid to match the value of some other user on your host system: https://vikunja.io/docs/install-backend/#files-volume
from vikunja.
I found something in vikunja/api Dockerfile:
ENV PUID 1000
ENV PGID 1000
I guess it is the answer, I am wrong before, it associate docker usergroup and host usergroup;
thank you, Sir : )
from vikunja.
PS: this error msg is circulate print in browser console
from vikunja.
Hi :)
What Vikunja version is that? (There should be a message in the browser console)
Can you reproduce this on try?
from vikunja.
Hello Sir:
This is the frontend version: Vikunja frontend version 0.17.0+47-34ded051d1,
Sir, when I upload image file to "try", I found a error existed, show below:
Thanks for response : )
from vikunja.
That's odd - works for me on try (at least for tasks).
Does the error also occur in a private tab with all caches cleared?
from vikunja.
I just retest it on "try", it worked, I guess maybe some static asset load error yesterday, the same time, I found a small issue, I add a list called: "test_list", and add a item called: "test_image_upload", when I click the attachment, it looks like miss token in request header so the api call is rejected by api server
from vikunja.
"e is not defined" error message still exist in my environment, I guess maybe I did something wrong, I follow majority of your instruct on vikunja website: "nginx -> (api + frontend)", but I add a layer, "caddy -> nginx -> (api + frontend)", I just use caddy point to nginx's port, just like: nginx associate local 127.0.0.1:8000, and caddy as a reverse proxy point to 127.0.0.1:8000(because caddy had very easy let's encrypt certificate apply and I had some app use caddy, I want make all of them in one place), I will visit nginx only as reverse proxy and try it later
from vikunja.
it looks like miss token in request header so the api call is rejected by api server
Anything in the server logs? Is the file created correctly in the db and on disk?
I had some app use caddy, I want make all of them in one place), I will visit nginx only as reverse proxy and try it later
If you're running with docker behind caddy, you might want to check out the caddy proxy examples.
from vikunja.
Anything in the server logs? Is the file created correctly in the db and on disk?
Sir, I am sorry for my bad English and my bad expression, "try" is try, it is your website, so I could not know the server logs.
If you're running with docker behind caddy, you might want to check out the caddy proxy examples.
Thanks, Sir, I will follow your instruct to check out "the caddy proxy examples"
from vikunja.
If you're running with docker behind caddy, you might want to check out the caddy proxy examples.
Thanks, Sir, I will follow your instruct to check out "the caddy proxy examples"
Sir, I followed your instruct, and I update all vikunja images(vikunja/api:latest + vikunja/frontend:latest) and the issue still exists;
my docker-compose yml:
version: '3'
services:
db:
image: mysql:8.0.25
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: ******
MYSQL_DATABASE: vikunja
volumes:
- ./db:/var/lib/mysql
restart: unless-stopped
api:
image: vikunja/api
environment:
VIKUNJA_DATABASE_HOST: db
VIKUNJA_DATABASE_PASSWORD: ******
VIKUNJA_DATABASE_TYPE: mysql
VIKUNJA_DATABASE_USER: root
VIKUNJA_DATABASE_DATABASE: vikunja
volumes:
- ./files:/app/vikunja/files
depends_on:
- db
restart: unless-stopped
ports:
- "127.0.0.1:11000:3456"
frontend:
image: vikunja/frontend
restart: unless-stopped
ports:
- "127.0.0.1:11001:80"
my Caddyfile is:
vikunja.fenr.men {
reverse_proxy /api/* 127.0.0.1:11000
reverse_proxy /.well-known/* 127.0.0.1:11000
reverse_proxy /dav/* 127.0.0.1:11000
reverse_proxy 127.0.0.1:11001
}
While upload images failed, the vikunja/api log is:
because I enable the firefox's resist browser fingerprint option, so the request header is wrong.
I guess the issue is when file create, vikunja/api face a permission question, but why it happend? I don't know : (
almost everything works fine, except upload images, if you need more log, please tell me, thanks Sir : )
from vikunja.
Wow, it worked, Thanks, Sir, and I have a question, I had add docker to sudo group, so if its permisson group is: root:root, it should has permission to store file in my home directory, why it can't? did it say: docker usergroup is just docker usergroup, it is not root:root, it is just docker:docker and equal to user:user, not equal to root:root, so it has not permission to store file in user:user's folder, is it right? if so, why vikunja/db can store file in my home directory? I can't understand it 😂
ps: just a irrelavant question
from vikunja.
Related Issues (20)
- Opera Mobile OIDC Login not possible HOT 8
- Upcoming "Today" not showing expected tasks HOT 1
- Problems with single-container version: 502, Migration failed, no live upstreams HOT 1
- cannot scroll sidebar to switch to different list items HOT 2
- Line breaks not working in task description HOT 2
- Date picker current date incorrect if page was not refreshed in browser today HOT 3
- 403 Forbidden when adding Label in Share Link HOT 4
- Dark mode - Low contrast for table headers within tasks HOT 1
- Todoist migration: Buckets HOT 3
- Saved filters are not updated when tasks are updated HOT 4
- sticky openid login / Authentik OpenID misconfiguration HOT 4
- Switching back from :unstable tag to :latest tag breaks website HOT 3
- Kanban board width too small in share link HOT 1
- Error when paste text to task - error reading 'nodeSize' HOT 2
- Unable to go to cloud app in Brave Private tab. HOT 1
- Add cache-control headers to background images
- State in docs where to report bugs/issues
- patch to fix typos HOT 2
- Make import page have formatting consistent with other pages HOT 2
- Succesful login does not redirect/login HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vikunja.