Friday, December 15, 2017

Invalid command '\xef\xbb\xbf#', perhaps misspelled or defined by a module not included in the server configuration


\xef\xbb\xbf are three invisible junk characters (at least from Apache's perspective) called the Unicode BOM, or byte order mark. Apache thinks that those characters are part of the command that follows right after. This is what you see in the log, though the characters are escaped so they're visible to the naked eye. \xef\xbb\xbfRewriteEngine

Copy the content in any advanced notepad editor which will detect the characters and you can easily remove them.

If you are not able to see these characters, remove this file completely and write again.

cpanel - wordpress - internal server error because of invalid permissions

cpanel - wordpress application - fix wordpress permissions of complete directory

cpanel > wordpress tool kit > Manage your site (Click on manage button) > Fix Permissions

It will fix all permissions of wordpress directory.

s3cmd : Configure multiple s3 buckets of multiple aws accounts on same server


First configure s3 bucket of 'AWS account - A' with s3cmd
s3cmd --configure
Add Access key and Secret Key of your 'AWS account A'.

Now rename ~/.s3cfg to ~/.s3cfg-first
You can find .s3cfg file in your home directory of logged in user.

Now configure s3 bucket of 'AWS account - B'
s3cmd --configure
Add Access key and Secret Key of your 'AWS account B'.
Now rename ~/.s3cfg to ~/.s3cfg-second

 
Configure third and so on

If you do not define config file parameter in command, it takes default config file i.e. .s3cfg


You need to define config file with command and you can communicate with different s3 buckets of one AWS account or multiple AWS accounts.
s3cmd ls s3://bucketname -c ~/.s3cfg-first
Above command will list the content of the defined s3 bucket of AWS account - A.
s3cmd ls s3://bucketname -c ~/.s3cfg-second
Similarly it will list the content of the defined s3 bucket of AWS account - B.

Now you can copy content, delete content or move them with different s3cmd commands.

Note : Number of buckets you can access of AWS account A or AWS account B, it depends on the privileges provided to access key and secret key and privileges are defined by the policy attached to the user whose access key and secret key you are using. 

If a policy which has read, write and list access of only one bucket 'Bucket-A' of an AWS account and this is the only policy attached to a user whose access key and secret key you are using then you can access only Bucket-A of that AWS account by using the access key and secret key of the user.