-
Notifications
You must be signed in to change notification settings - Fork 240
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
FILE_DIR error? #79
Comments
Make sure that the owner of the uploads directory on the host is the user with UID 1000. Inside the container, the Send is launched on behalf of the user "app" with this UID. The user in the container must have write access to the /uploads.
I ran into a similar problem and also didn’t understand where the files that didn’t end up in /uploads go. |
I just recently found tmp files in the /var/lib/docker/overlay2 folder of the files I have been uploading. I am still wondering why this compose file isn't using the file directory I specify... any ideas? |
Send does currently not support using a local directory for uploads when running in production mode ( If you're experiencing permission errors, make sure to set proper directory permissions on your host for the mounted directory. |
I'm currently setting up Send and am encountering the same issue as OP. When the env FILE_DIR is defined, uploading files causes the same error as in the OP. Leaving it undefined allowed up- and downloading, but now I have no idea where the uploaded files go.
as well as the environment variables in a separate send.env file:
since im new to docker and self hosting, i dont know how to check the write permissions for the data folder inside the volume. but as other containers are perfectly capable to r/w into them, i'd assume this isnt a permission issue. i would love if send would use the assigned volume, but dont know how to get it to work. do i have to switch to the dev mode as mentioned in your previous comment to get this to work? or are there other workarounds that would allow the use of the specified volume? |
Update I have been able to fix, or rather circumvent, this issue. After lots of investigation I found that inside the container, the /uploads folder (from the volume) is mounted with
(content reduced to relevant data) Now, send runs as user ID 0 and is perfectly able to r/w in the /uploads folder, and encrypted files appear in the volumes' folder on the host as expected, even when using the production environment. But, I am unsure if there are security or functionality implications with this approach. After a very short and dirty test, all seems to be working fine, but I will investigate more. I'd much appreciate some input from @timvisee if this is a stupid idea or not. For now, I'll leave it running as is. |
it's work for me.
|
Hi, do you know how would it be for windows? |
I think that the default upload directory is not https://github.com/timvisee/send/blob/master/server/config.js#L188 |
I run Send like this: |
I am able to get Send to work, but I noticed that my instance isn't using the volume I specified in the docker_compose.yml file.
My docker_compose.yml is as follows:
version: "3"
services:
send:
image: registry.gitlab.com/timvisee/send:latest
restart: always
ports:
- '1234:1234'
volumes:
- uploads:/uploads
environment:
- VIRTUAL_HOST=send.***.com
- VIRTUAL_PORT=1234
- DHPARAM_GENERATION=false
- NODE_ENV=production
- BASE_URL=https://send.***.com
- PORT=1234
- REDIS_HOST=redis
redis:
image: 'redis:alpine'
restart: always
volumes:
- send-redis:/data
volumes:
send-redis:
uploads:
If I uncomment the FILE_DIR variable, Send gives me an error in the logs during file upload as follows:
{"Timestamp":1649169981773000000,"Logger":"FirefoxSend","Type":"uncaughtException","Severity":0,"Pid":1,"EnvVersion":"2.0","Fields":{"error":"Error: ENOENT: no such file or directory, unlink '/uploads/1-10889695b316358b'","stack":"\n at Object.unlinkSync (node:fs:1718:3)\n at WriteStream. (/app/server/storage/fs.js:33:12)\n at WriteStream.emit (node:events:402:35)\n at WriteStream.emit (node:domain:475:12)\n at emitErrorNT (node:internal/streams/destroy:157:8)\n at emitErrorCloseNT (node:internal/streams/destroy:122:3)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)"}}
Basically, I just want to know where my files are going in this current setup because I cannot find the uploaded files anywhere in my bin/sh. This is more of a security question for me. I could very much be setting up Send incorrectly. Either way, I just want to know where my files get stored currently.
The text was updated successfully, but these errors were encountered: