Buildkit - amp test recieved incorrect response while connecting to a test application
The error was due to the permission issue but I used another method for solving this.
At the time of amp config I chose [1] for the option perm_type, which sets the appropriate permissions according to linux.

Option: perm_type
Description: How to set permissions on data directories [none,custom,linuxAcl,osxAcl,worldWritable]. See https://github.com/totten/amp/blob/master/doc/perm.md

Default: none

Enter perm_type


[0] "none": Do not set any special permissions for the web user
[1] "linuxAcl": Set tight, inheritable permissions with Linux ACLs
[setfacl] (recommended)
         In some distros+filesystems, this requires extra configuration.
         eg For Debian-based distros: https://help.ubuntu.com/community/FilePermissionsACLs   
[2]"osxAcl": Set tight, inheritable permissions with OS X ACLs [chmod
+a] (recommended)   
[3] "custom": Set permissions with a custom command
[4] "worldWritable": Set loose, generic permissions [chmod
1777] (discouraged)