Skip to content

Instantly share code, notes, and snippets.

@git-bhanu
Created November 30, 2021 09:28
Show Gist options
  • Save git-bhanu/0e004724473ac7ed1d9ac57b8f7ed546 to your computer and use it in GitHub Desktop.
Save git-bhanu/0e004724473ac7ed1d9ac57b8f7ed546 to your computer and use it in GitHub Desktop.
When setting up openlitespeed on AWS and trying to scp you can get `.ppk are too open` issue. This gist is a document which would help you fix that.

Fix .ppk are too open when running the command from your windows WSL

(This may work on windows CMD terminal as well.)

Quick fix command that needs to be used.

sudo scp -i /mnt/d/PuttyKey/live_open_ssh -r /mnt/d/ixi\ backup/November_29_acf8a2576fd1cce99287_20211129171850_archive.zip ubuntu@ec2-1-111-11-111.us-east-X.compute.amazonaws.com:/var/www/html

When you will run this you may get

scp: /var/www/html/November_29_acf8a2576fd1cce99287_20211129171850_archive.zip: Permission denied

To fix this login into your ec2 instance and run the following command

sudo chown -R ubuntu:ubuntu /var/www/html
sudo chmod -R 755 /var/www/html

Fixing permissions for your instance. https://docs.litespeedtech.com/cloud/images/wordpress/#uploading-files

sudo chown -R www-data:www-data /var/www/html
sudo find /var/www/html -type d -exec chmod 0755 {} \;
sudo find /var/www/html -type f -exec chmod 0644 {} \;
@git-bhanu
Copy link
Author

OpenLiteSpeed Change PHP version

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