Debug Overleaf Error: can't create new project/upload files

Debugging Overleaf: Fixing “Create Project” & File Upload Failures

A few days after fixed the MongoDB Error, I suddenly found that creating new projects or uploading files would consistently fail with an HTTP 500 error from the web service.

Frontend logs gave little detail, but the history-v1 service logs revealed the root cause:

1
EACCES: permission denied, mkdir /var/lib/overleaf/data/history/overleaf-chunks/...

Overleaf couldn’t create directories needed to store project history.

The Cause

The directory /var/lib/overleaf/ inside docker had mixed ownership—some files belonged to www-data:www-data, others to my local user (dyliu:dyliu). This broke the write permissions required during project initialization.

The Fix

Enter the container and correct permissions:

1
2
3
4
docker exec -it sharelatex bash
chown -R www-data:www-data /var/lib/overleaf
chmod -R u+rwX /var/lib/overleaf
exit

Project creation and uploads worked immediately after.

We can further test it by restarting the services:

1
2
bin/stop
bin/up -d

Everything works great!

Takeaway

HTTP 500 errors in Docker often point to volume permission issues, not code bugs.
For Overleaf specifically, writable history storage is essential for project creation. Checking volume ownership early can save significant debugging time.

Reference

ChatGPT
Deepseek


Debug Overleaf Error: can't create new project/upload files
https://dyliu0312.github.io/blog.github.io/2025/12/26/Debug-Overleaf-Error-can-t-create-new-project-upload-files/
Author
dyliu
Posted on
December 26, 2025
Licensed under