Amazon AMI Edit vhost Permission Denied

8 views
Skip to first unread message

John Jackman

unread,
Jun 1, 2019, 11:45:50 PM6/1/19
to Church.IO
Launched Amazon AMI instance and got everythign running, but when I get to SSL setup, https://github.com/seven1m/onebody/wiki/SSL-Setup, I cannot edit the indicated files -- in WinSCP I get Error 3, Permission denied.  So stuck on installing SSL certificate, CertBot fails to install certificate because the vhost name is not there.  I've gotten through all the issues except this, and Google hasn't revealed anything except I need to be logged in as root, which I can't do.  Amazon wants us to log in as ec2-user, the AMI is set up for ubuntu as user. 

I'd appreciate any links ot hints on how to work around this!  THANKS

John Jackman

unread,
Jun 2, 2019, 5:02:06 PM6/2/19
to Church.IO
Okay, I did find the answer.  For anyone else that runs into this, you have to change ownership of the directory/files to "ubuntu."

To do this in Putty, you execute the following commands:

# sudo su

# cd /etc/nginx/

# chown -R ubuntu sites-available

# chown -R ubuntu sites-enabled

Then you follow the instructions in https://github.com/seven1m/onebody/wiki/SSL-Setup to edit the onebody file to include your domain name.  You should check that the same file in sites-enabled updates to include the domain names too.

Reply all
Reply to author
Forward
0 new messages