Skip to content

fix: chown /var/lib/overleaf mount point to www-data#1475

Open
ev-not-eve wants to merge 1 commit into
overleaf:mainfrom
ev-not-eve:patch-1
Open

fix: chown /var/lib/overleaf mount point to www-data#1475
ev-not-eve wants to merge 1 commit into
overleaf:mainfrom
ev-not-eve:patch-1

Conversation

@ev-not-eve
Copy link
Copy Markdown
Contributor

Description

The init script chowns all subdirectories but not the mount point itself. When the host volume is owned by a non-www-data user with restrictive permissions (e.g. 770), the web process cannot traverse the directory and crashes with EACCES, causing a 502.

Related issues / Pull Requests

Fixes #1325 and #1465

Contributor Agreement

The init script chowns all subdirectories but not the mount point
itself. When the host volume is owned by a non-www-data user with
restrictive permissions (e.g. 770), the web process cannot traverse
the directory and crashes with EACCES, causing a 502.

Fixes overleaf#1325 and overleaf#1465
@mserranom
Copy link
Copy Markdown
Contributor

@das7pad thoughts on this? I understand we've intentionally tried to avoid changing the ownership of the mount point, but I see the situation with 770 permissions.

Maybe chmod a+x /var/lib/overleaf is enough here?

Copy link
Copy Markdown
Member

@das7pad das7pad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sensible to me.

@mserranom
Copy link
Copy Markdown
Contributor

Hey @ev-not-eve I haven't been able to find the record of your signature in the Contributor License Agreement. Did you indicate a different Github handle perhaps?

@ev-not-eve
Copy link
Copy Markdown
Contributor Author

Hey @ev-not-eve I haven't been able to find the record of your signature in the Contributor License Agreement. Did you indicate a different Github handle perhaps?

redid my signature; made sure to include my github handle. It’s possible that I misspelled it the first time :)

@mserranom
Copy link
Copy Markdown
Contributor

mserranom commented May 18, 2026

Hey @ev-not-eve I have some issues importing this PR into our internal repos using our internal syncing process (likely caused by our yarn migration).

Do you mind rebasing the PR against the main branch? Sorry for the hassle!

Nevermind, I managed to sort out the issue.

mans0954 pushed a commit that referenced this pull request May 19, 2026
The init script chowns all subdirectories but not the mount point
itself. When the host volume is owned by a non-www-data user with
restrictive permissions (e.g. 770), the web process cannot traverse
the directory and crashes with EACCES, causing a 502.

Fixes #1325 and #1465

COPYBARA_INTEGRATE_REVIEW=#1475 from ev-not-eve:patch-1 269a805

Co-authored-by: Evelyn <evansvevelyn@gmail.com>
GitOrigin-RevId: 959051861246c9f3958e56861821b92d84167926
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

502 Bad gateway error with latest version 5.3.2

3 participants