question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

update docs about socket directory permissions

See original GitHub issue

I tried to follow the install steps to the best of my ability, on a fresh Ubuntu 21.04 host. I ran into an issue out of the box, where nginx just returns 502 Bad gateway upon accessing the site.

image

In /home/bepasty/logs/nginx-error.log I see something like this:

connect() to unix:/home/bepasty/gunicorn.sock failed (13: Permission denied) while connecting to upstream, client: 10.20.30.x, server: xxxmy.site.name, request: "GET / HTTP/1.1", upstream: "http://unix:/home/bepasty/gunicorn.sock:/", host: "xxxmy.site.name"

I can’t figure this out despite lots and lots of googling.

The only thing that “works” for me is to change the user that nginx runs as, by editing /etc/nginx/nginx.conf and changing www-data to bepasty:

user bepasty; #changed from www-data

But, I imagine there are problems with this solution, and it doesn’t scale when nginx needs to serve multiple sites.

Has anyone run into this and know how to properly fix? I’m a bit bewildered when it comes to gunicorn/flask.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
luckman212commented, Oct 4, 2021

Sure once I have known-good working steps I am happy to update the docs via a PR. Still working out some issues though!

0reactions
ThomasWaldmanncommented, Oct 4, 2021

A hint would be good, can you make a PR with the docs update?

Guess the xbit on the directory is the minimum requirement. And either adapt the group or give x to others.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure File System Permissions for Database Engine Access
The Database Engine service must have permission of the Windows file system to access the file folder where database files are stored.
Read more >
UNIX File Permissions - Securing Files and Verifying File ...
UNIX File Permissions. The following table lists and describes the permissions that you can give to each class of user for a file...
Read more >
Manifest.permission - Android Developers
Docs More ... Manifest · Manifest.permission · Manifest.permission_group ... BluetoothLeAudioCodecStatus · BluetoothManager · BluetoothServerSocket ...
Read more >
IBM MQ file system permissions applied to /var/mqm
The following directories contain socket files that have read/write permissions for all users ( srwxrwxrwx ). IBM MQ 8.0: /var/mqm/sockets/ QMGR /zsocketEC/ ...
Read more >
socket — Low-level networking interface — Python 3.11.1 ...
Create a new socket using the given address family, socket type and protocol number. The address family should be AF_INET (the default), AF_INET6...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found