Skip to content

Insufficient permissions for unix socket #5827

@Navet64

Description

@Navet64

Pre-submission Checklist

  • I have searched existing issues and confirmed this bug has not been reported
  • I can reproduce this bug on the latest version or the demo site
  • This is a bug, not a question (use Discussions for questions)

Memos Version

latest commit

Deployment Method

Built from source

Database

PostgreSQL

Browser & OS

doesn't matter here

Bug Description

Hello,
The unix socket is created with these permissions:
localhost:~# ls -l /tmp/memo.sock
srwxr-xr-x 1 memo memo 0 Apr 11 16:59 /tmp/memo.sock

The reverse proxy (I use nginx, but others should behave the same) can't access it, because it wants the write permission on the socket.

Would it be possible to put the permissions of the socket file at 777 or 770 (the reverse proxy user would be added to the memos group)?

Without that, the software doesn't work, since the reverse proxy can't access the socket :(

Steps to Reproduce

  1. Launch the software with unix socket config env var
  2. Direct the reverse proxy to the unix socket
  3. Doesn't work
  4. chmod 777 the unix socket
  5. Works

Expected Behavior

The unix socket should have other permissions? Why is github asking so many questions about a simple issue??? 😭

Screenshots, Logs & Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions