1

I had successfully ran the buildkit till got this error while running amp test. It created the test application, created data directory, set up few ports

Create data directory:/home/***/.amp/canary/data/FivN1DBNa4c05mUoshFCNDn2dHMDc01I
AMP_URL='http://localhost:7979'
AMP_ROOT='/home/***/.amp/canary'
AMP_DB_DSN='mysql://canary_zcz0m:AfLQGc9SAf9Y8zno@127.0.0.1:3306/canary_zcz0m?new_link=true'
AMP_DB_USER='canary_zcz0m'
AMP_DB_PASS='AfLQGc9SAf9Y8zno'
AMP_DB_HOST='127.0.0.1'
AMP_DB_PORT='3306'
AMP_DB_NAME='canary_zcz0m'
AMP_DB_ARGS='-h 127.0.0.1 -u canary_zcz0m -pAfLQGc9SAf9Y8zno -P 3306 canary_zcz0m'

Connect to test application
Expect response: "response-code-8UnKuVzEwx"

and while connecting to test application it showed :

Received incorrect response: "Error: Failed to write /home/***/.amp/canary/data/FivN1DBNa4c05mUoshFCNDn2dHMDc01I/example.txt
Error: Failed to remove /home/***/.amp/canary/data/FivN1DBNa4c05mUoshFCNDn2dHMDc01I/example.txt"

I have followed the commands given here : https://buildkit.civicrm.org/#/tutorials.

And restarted the server many times.

1

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

  1. [0] "none": Do not set any special permissions for the web user
  2. [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
  3. [2]"osxAcl": Set tight, inheritable permissions with OS X ACLs [chmod +a] (recommended)
  4. [3] "custom": Set permissions with a custom command
  5. [4] "worldWritable": Set loose, generic permissions [chmod 1777] (discouraged)
1

I encountered the same error, setting up buildkit and then running amp config and amp test on Ubuntu 19.04.

What I figured out was that I too had initially chosen 0 for perm_type when running amp config.

I changed the perm_type value to linuxAcl and chose www-data as the web user.

Using those values then allowed me to successfully run amp test.

0

This might be due to permission issues, so as you mentioned that you followed civicrm-buldkit tutorials, now assuming that your buildkit is installed in /opt/buildkit directory I would suggest to change the permission of this directory by running the following code :

sudo chmod -R 777 /opt/buildkit

This command will recursively change the permission of the directory and enable all other users to create/modify/delete files and directories in it. But it is not advisable to do a 777 because of security reasons. If you are really concern about security then please look into changing the ownership of the files/directory or may be do a 755 instead with suitable arguments.

Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.