Resolve the Access Denied Error in Amazon S3 when viewing uploaded file

Before you can access a file that is uploaded to a bucket, you need to apply public permissions using either “ACL settings” or the “bucket policy” tool.

To apply the bucket policy, perform the following steps:
1) Open S3 management console
2) Choose a bucket, click “Properties”, click “Add bucket policy”.
3) Apply the policy using the policy script or AWS policy generator.
4) The following example policy will grant permissions for all user who got the link to view file located in the examplebucket.

  "Version": "2008-10-17",
  "Id": "Policy-id",
  "Statement": [
      "Sid": "",
      "Effect": "Allow",
      "Principal": {
        "AWS": "*"
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::examplebucket/*",
      "Condition": {}

For more information, please see the following AWS documentation:

Change MySql root password on centos

To change the root password, we need to still start mySQL with –skip-grant-tables options and update the user table

1. Stop mysql:
systemctl stop mysqld

2. Set the mySQL environment option
systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"

3. Start mysql usig the options you just set
systemctl start mysqld

4. Login as root
mysql -u root

5. Update the root user password with these mysql commands
mysql->UPDATE mysql.user SET authentication_string = PASSWORD('MyNewPassword')
    ->WHERE User = 'root' AND Host = 'localhost';
mysql-> quit

*** Edit ***
For 5.7.6 and later, you should use
   mysql->ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
Or you'll get a warning

6. Stop mysql
systemctl stop mysqld

7. Unset the mySQL envitroment option so it starts normally next time
systemctl unset-environment MYSQLD_OPTS

8. Start mysql normally:
systemctl start mysqld

Try to login using your new password:
7. mysql -u root -p

Redirecting to HTTPS from HTTP

If we have added an SSL certificate to your domain, we can force all visits to your site to use HTTPS to ensure your traffic is secure. This post shows examples on how to do this.

The following forces any http request to be rewritten using https. For example, the following code forces a request to to load It also forces directly linked resources (images, css, etc.) to use https:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 

Hope this help you to redirect from http to https

Updating/Upgrading Magento 2 using Command Line

In this post we are discussing about how we can update/upgrade Magento 2 using command line

First of all you need the ssh access and login with the username and password and move to the root directory in which Magento 2 is installed

Then you need to run this commands one by one

composer require magento/product-community-edition 2.2.3 --no-update
composer update
rm -rf var/di var/generation
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento indexer:reindex

Here 2.2.3 is the latest version of Magento 2, you can change this to what ever versions and can be found here

After all these commands executed ,check your Magento version with the following command:

php bin/magento --version