AWS OpenLiteSpeed SFTP Permissions

jcm

New Member
#1
Hello, I have installed OpenLIteSpeed from the Amazon AWS Marketplace and not just once a few times as I messed up the permissions trying to fix them so restarted a few times.

The summary of it is Wordpress functions well but if I connect via SFTP with username "ubuntu" as required, then uploading, deleting or moving files all results in "permission denied".

I used Filezilla with the username "ubuntu" with key file.

So on the forums I found this for ubuntu:

Code:
sudo chown -R ubuntu:ubuntu /var/www/html


sudo chmod -R 755 /var/www/html
This worked, it solved my problem but after that when you try upload anyting in Wordpress plugins or like enabled disable LS Cache it cannot write to the .htaccess/wp-config.ph as the permisisions now shifted and upload plugin/install requests FTP details so this is also not a solution.

please let me know how to fix this as I have the same problem on GCP and have a couple of sites running there with now way to SFTP in with the ability to upload/edit/delete files.

Thank you in advance.
 

Colcol

New Member
#2
Non-expert reply:

Problem presumably lies with the different user/group used to install OLS in the AWS image. Perhaps not want you want to hear, but I would start afresh on a standard instance and install OLS manually following this video:
and these instructions: https://www.litespeedshare.net/snip...#9M2wLSn9rJsZ8vo8df2ktm66hC5ZvQRxWtN9fyHSQGNx

The process is longer of course, but you set up each website with its own user/group so there are no permission issues. You get a better understanding of what is going on this way as well. I got it all working and I have WP sites running happily with LS Cache, SFTP etc.
 

jcm

New Member
#3
Hi Colcol, you might be surprised but I am goign to probably agree with you. The largest reason for using the images is the cloud permissions are setup so I will see what instance I can spin up on GCP and AWS then do an install of both.

Thank you for your response ;-)
 

Colcol

New Member
#4
no problem. my newbie experience of this and other forums is a lot of questions start with 'installed with Cyberpanel' or 'installed with this image' and I get the impression such 'easier' installs create more problems down the road.

something i noted in the above OLS instructions was chown user-name:nobody /home/domain.com/public_html

you have to set the group permission to 'nobody' (or 'nogroup' for Debian) for this public_html directory. i think this requirement catches people out and creates permission errors if not performed.

I also installed certbot for the SSL, rather than use acme.sh as per those instructions.
 

jcm

New Member
#5
the image on AWS uses "ubuntu" as the username so I tink that is where the problem starts as OLS has already set the permissions for the wordpress install user and now it is changed to "ubuntu" so I have to, i guess, figure out the username for the wordpress install and use that to login with SFTP... oh what fun, lots to learn.

one thing I refuse at this point is using Cyberpanel for the simple reason that I will learn less by using it so going to keep on trucking and try find the solution hehehe
 
Top