Sunday, 12 September 2021

Configure a Custom domain on your blogspot blog

In order to configure the custom domain name on a Google Blogspot account, you will need to perform 3 steps.

 

Step 1: BlogSpot Change

you will have to log into your Blogger account and go to the Settings page.

In the Settings page, there is a section called "Customize your blog". Click on that.


Head to section "Publishing Section". 

 

Do click on custom domain. Do put a domain and hit save.

 

First Error: Blogs may not be hosted at naked domains. so put www or any sub-domain. example www.abc.xyz or blog.abc.xyz.

Now this time you will save you will get Second Error. The Error say "we have not been able to verify your authority to this domain...". Copy the Entire Error into text editior. Here it asks you to update the CNAMEs. you will get 2 CNAMEs.

1. Name: www, Destination: ghs.google.com

2. Name: alphanumeric_id(unique), Destination: unique_url

 

 

Step2: Domain Provider Change

Now Go to your domain provider. I am using the NameCheap so I will login into it and open the dashboard.


 

For the domain you want to manage, click Manage.


 Now Click on Advanced DNS. Here you will see option to add the CNAME record. Click "Add New Record".


After Adding 2 CNAMEs Record that we got from blogspot, it will look like this.

Click on Save all Changes and it's done. Wait for 15 to 30 min. Repeat the Step-1 again and this time it will be linked. 

 

Step3: Enable HTTPS

By default, Blogger blogs are https enabled but when configure a custom domain we need to perform a extra few steps.

You need to add 4 A record in DNS setting(where we previously added the CNAME record). So total we will have 6 records(4 A records + 2 CNAME record) and set the value like below:



Do Note: If A-records for yourdomain already exist, you should remove existing A-records.

These IPs are provided by google:(link to post at bottom)


Once this is done. Wait for 15 to 30 min then enable https redirect in blogger setting.(http traffic will redirected to https)

 

That's it. Check in sometime. your domain will point to now blogger. If still facing any, comment below and let us know.

PS : https://support.google.com/blogger/answer/1233387

Thanks

Monday, 10 May 2021

Linux Permission Overview

In Linux, every file and directory has permissions that control who can read, write, and execute the file or access the directory. These permissions are represented by a series of letters and symbols.

There are three types of permissions in Linux:

  • read (r) - Allows a user to view the contents of a file or list the files in a directory.
  • write (w) - Allows a user to modify the contents of a file or add or delete files in a directory.
  • execute (x) - Allows a user to run a file as a program or access files in a directory.

These permissions are assigned to three groups of users:

  • user (u) - The owner of the file or directory.
  • group (g) - The group that the file or directory belongs to.
  • others (o) - Any user that is not the owner or a member of the group.

You can use the ls -l command to view the permissions of files and directories in the current directory. The output will be a list of files and directories, with the permissions for each item listed in the first column. The permissions are represented by a series of letters and symbols, where the first three characters represent the permissions for the user, the next three characters represent the permissions for the group, and the last three characters represent the permissions for others.

Here is an example of the ls -l output:

drwxrwxr-x  2 user group   4096 Jan  1 12:00 myfolder
-rw-rw-r--  1 user group    123 Jan  1 12:00 myfile.txt

In this example, the first character din the first line shows that "myfolder" is a directory.

The next three characters rwxshow that the user has read, write, and execute permissions on the directory. The next three characters rwxshow that the group has read, write, and execute permissions on the directory. The last three characters r-xshow that others have read and execute permissions on the directory but do not have write permissions.

The first character - in the second line shows that "myfile.txt" is a regular file. The next three characters rw-show that the user has read and write permissions on the file.

The next three characters rw-show that the group has read and write permissions on the file. The last three characters r--show that others have only read permissions on the file but do not have write or execute permissions.

You can use the chmod command to change the permissions of a file or directory. The chmod command takes two arguments: the first is the permissions you want to set, and the second is the file or directory you want to change.

There are two ways to specify the permissions in the chmod command:

  1. Symbolic mode: This method uses symbols to specify the permissions. The symbols used are:

    • r (read)
    • w (write)
    • x (execute)

      The symbolic mode also uses the following symbols to specify which users the permissions apply to:

    • u (user/owner)

    • g (group)
    • o (others)
    • a (all)

To set permissions using the chmod command, you can use a combination of the above options and the following symbols:

    • (plus): Adds the permission.
    • (minus): Removes the permission.
  • = (equals): Sets the permission exactly as specified.

Example:

  1. To give the owner, group, and others read and write permissions on a file:
chmod a+rw file.txt

In this example, represents all users (owner, group, and others), and +rwadds read and write permissions.

b. To give the owner execute permission and remove write permission on a file:

chmod u+x,g-w file.txt

In this example, u+xadds execute permission for the owner, and g-wremoves write permission for the group.

c. To give the owner read and write permission, and remove all permissions for the group and others:

chmod u+rw,g-rwx,o-rwx file.txt

In this example, u+rwadds read and write permission for the owner, g-rwxremoves all permissions for the group, and o-rwxremoves all permissions for others.

Remember that the order of the symbolic mode options matters. The permissions are applied in the order they are specified, so make sure to specify the options in the correct order to achieve the desired result.

  1. Numeric mode: This method uses numeric values to specify the permissions. Each permission is assigned a numeric value:
  2. 4 (read)
  3. 2 (write)
  4. 1 (execute)

You can add these values to specify the permissions you want to set. For example, to give the owner read, write, and execute permissions on a file, you would use the command:

chmod 700 file.txt

In this example, the first digit (7) represents the owner's permissions (4 + 2 + 1), and the remaining digits (0) represent the group and other users' permissions.

let’s take another example:

To give the owner read and execute permissions, and remove all permissions for the group and others on a directory:

chmod 500 directory/

In this example, the first digit (5) represents the owner's permissions (4 + 1 = read and execute), and the remaining digits (00) represent the group and others' permissions.