Skip to content
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

Permission denied after prod setup #285

Closed
thepra opened this issue Mar 21, 2020 · 4 comments
Closed

Permission denied after prod setup #285

thepra opened this issue Mar 21, 2020 · 4 comments

Comments

@thepra
Copy link

thepra commented Mar 21, 2020

Describe the bug

I created the folder /var/www/blog.example.com/ in which I extracted writefreely, setted up nginx and the systemd service, now starting the service gives me permission denied despite I setup the owner as www-data. Should I setup to a different owner?

Application configuration

  • Single mode or Multi-user mode? Multi-user
  • Database? sqlite
  • Open registration? no
  • Federation enabled? yes
@thepra thepra closed this as completed Mar 21, 2020
@thebaer
Copy link
Member

thebaer commented Mar 21, 2020

What was the fix for this, @thepra? It's always helpful for others to know in case they run into the same issue.

@thepra
Copy link
Author

thepra commented Mar 28, 2020

😅 can't remember anymore, solved it but then after trying writefreely I felt it was under developed(features wide). So I left it. Sorry.

@thebaer
Copy link
Member

thebaer commented Mar 28, 2020

No problem. Out of curiosity, which features were you missing most?

@nzjc
Copy link

nzjc commented Mar 2, 2024

I found a reasonable way around this
(Ubuntu 20 something, nginx rproxy, writefreely 1.5)

  • install and configure wf with sudo -u www-data ./writefreely config start etc.

Previously I had been doing it as my logged in user, or as root via sudo, and that made all sorts of permissions errors bound to happen. As the site is not purely static I didn't really wanna run it all as root.

Also, to get things working from a systemd level, my service def looks like this (and works!)

Description=WriteFreely Instance
After=syslog.target network.target

[Service]
User=www-data
Group=www-data
Type=simple
StandardOutput=syslog
StandardError=syslog
WorkingDirectory=/var/www/{MY_DOMAIN}/writefreely
ExecStart=/var/www/{MY_DOMAIN}/writefreely/writefreely
Restart=always

[Install]
WantedBy=multi-user.target

Hope that helps someone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants