简体   繁体   中英

Write error when trying to run unicorn: directory for pid=/var/www/twimpush/pids/unicorn.pid not writable (ArgumentError)

I've followed the steps in the DigitalOcean guides here and here towards setting up a Sinatra server using nginx and Unicorn. I'm on the second to last step:

start the Unicorn and run it as a daemon using the configuration file: Make sure that you are inside the application directory ie /my_app

unicorn -c unicorn.rb -D

Running that command, I get the error:

directory for pid=/var/www/twimpush/pids/unicorn.pid not writable (ArgumentError)

I've tried this as both root , and as a user called deployer , to which I gave write permissions.

When I cloned my git repo, it didn't include the empty pids folder inside my repo. I added it with mkdir pids , in addition to the other required folders mentioned in the first guide, and it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM