{"action":"created","issue":{"url":"https://api.github.com/repos/lando/lando/issues/646","repository_url":"https://api.github.com/repos/lando/lando","labels_url":"https://api.github.com/repos/lando/lando/issues/646/labels{/name}","comments_url":"https://api.github.com/repos/lando/lando/issues/646/comments","events_url":"https://api.github.com/repos/lando/lando/issues/646/events","html_url":"https://github.com/lando/lando/issues/646","id":288610940,"number":646,"title":"Platform CLI is throwing \"operation not permitted\" error on lando start/rebuild","user":{"login":"dandinu","id":939182,"avatar_url":"https://avatars2.githubusercontent.com/u/939182?v=4","gravatar_id":"","url":"https://api.github.com/users/dandinu","html_url":"https://github.com/dandinu","followers_url":"https://api.github.com/users/dandinu/followers","following_url":"https://api.github.com/users/dandinu/following{/other_user}","gists_url":"https://api.github.com/users/dandinu/gists{/gist_id}","starred_url":"https://api.github.com/users/dandinu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dandinu/subscriptions","organizations_url":"https://api.github.com/users/dandinu/orgs","repos_url":"https://api.github.com/users/dandinu/repos","events_url":"https://api.github.com/users/dandinu/events{/privacy}","received_events_url":"https://api.github.com/users/dandinu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-01-15T14:24:47Z","updated_at":"2018-03-01T00:12:40Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI'm using *lando-v3.0.0-beta.36* on Windows 10 Professional, configured with Platform CLI. I am getting this error when doing a `lando start` or `lando rebuild`:\r\n```\r\nPlatform.sh CLI installer\r\n\r\nEnvironment check\r\n  [*] The PHP version is supported: 7.1.13.\r\n  [*] The \"json\" PHP extension is installed.\r\n  [*] The \"phar\" PHP extension is installed.\r\n  [*] Git is installed.\r\n  [*] The \"openssl\" PHP extension is installed.\r\n  [*] The \"curl\" PHP extension is installed.\r\n  [*] The \"ctype\" PHP extension is installed.\r\n  [*] The \"mbstring\" and/or \"iconv\" PHP extensions are installed.\r\n  [*] The \"allow_url_fopen\" setting is on.\r\n  [*] The \"apc.enable_cli\" setting is off.\r\n\r\nDownload\r\n  Finding the latest version...\r\n  Downloading version 3.26.1...\r\n  Checking file integrity...\r\n  Checking that the file is a valid Phar (PHP Archive)...\r\n\r\nInstall\r\n  Making the Phar executable...\r\n  Moving the Phar to your home directory...\r\n  Successfully moved the Phar to: /var/www/.platformsh/bin/platform\r\n\r\n  Running self:install command...\r\n  To set up the CLI, add the following lines to your shell configuration file:\r\n\r\n    # Platform.sh CLI configuration\r\n    export PATH='/var/www/.platformsh/bin':\"$PATH\"\r\n    . '/var/www/.platformsh/shell-config.rc'\r\nerror:  Error\r\n    at ChildProcess.<anonymous> (C:\\snapshot\\cli\\lib\\shell.js:0:0)\r\n    at emitTwo (events.js:125:13)\r\n    at ChildProcess.emit (events.js:213:7)\r\n    at maybeClose (internal/child_process.js:887:16)\r\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)\r\nFrom previous event:\r\n    at spawn (C:\\snapshot\\cli\\lib\\shell.js:0:0)\r\n    at Object.exports.sh (C:\\snapshot\\cli\\lib\\shell.js:0:0)\r\n    at shCompose (C:\\snapshot\\cli\\lib\\compose.js:0:0)\r\n    at Object.exports.run (C:\\snapshot\\cli\\lib\\compose.js:0:0)\r\n    at C:\\snapshot\\cli\\lib\\docker.js:0:0\r\n    at runCallback (timers.js:800:20)\r\n    at tryOnImmediate (timers.js:762:5)\r\n    at processImmediate [as _immediateCallback] (timers.js:733:5)\r\nFrom previous event:\r\n    at Object.exports.run (C:\\snapshot\\cli\\lib\\docker.js:0:0)\r\n    at C:\\snapshot\\cli\\lib\\engine.js:0:0\r\n    at runCallback (timers.js:800:20)\r\nFrom previous event:\r\n    at Object.exports.run (C:\\snapshot\\cli\\lib\\engine.js:0:0)\r\n    at AsyncEvents.<anonymous> (C:\\snapshot\\cli\\plugins\\lando-services\\lib\\config.js:0:0)\r\n    at AsyncEvents.handle (C:\\snapshot\\cli\\lib\\events.js:0:0)\r\n    at C:\\snapshot\\cli\\lib\\events.js:0:0\r\nFrom previous event:\r\n    at AsyncEvents.emit (C:\\snapshot\\cli\\lib\\events.js:0:0)\r\n    at C:\\snapshot\\cli\\lib\\app.js:0:0\r\n    at runCallback (timers.js:800:20)\r\nFrom previous event:\r\n    at Object.exports.start (C:\\snapshot\\cli\\lib\\app.js:0:0)\r\n    at C:\\snapshot\\cli\\plugins\\lando-core\\lib\\tasks\\start.js:0:0\r\nFrom previous event:\r\n    at Object.run (C:\\snapshot\\cli\\plugins\\lando-core\\lib\\tasks\\start.js:0:0)\r\nFrom previous event:\r\n    at C:\\snapshot\\cli\\lib\\tasks.js:0:0\r\n    at runCallback (timers.js:800:20)\r\n    at tryOnImmediate (timers.js:762:5)\r\n    at processImmediate [as _immediateCallback] (timers.js:733:5)\r\nFrom previous event:\r\n    at Object.exports.parseToYargs.command.handler (C:\\snapshot\\cli\\lib\\tasks.js:0:0)\r\n    at Object.module.exports.self.runCommand (C:\\snapshot\\cli\\node_modules\\yargs\\lib\\command.js:170:22)\r\n    at parseArgs (C:\\snapshot\\cli\\node_modules\\yargs\\yargs.js:920:28)\r\n    at Object.get [as argv] (C:\\snapshot\\cli\\node_modules\\yargs\\yargs.js:860:16)\r\n    at C:\\snapshot\\cli\\lib\\cli.js:0:0\r\nFrom previous event:\r\n    at Object.exports.init (C:\\snapshot\\cli\\lib\\cli.js:0:0)\r\n    at C:\\snapshot\\cli\\bin\\lando.js:0:0\r\nFrom previous event:\r\n    at Object.<anonymous> (C:\\snapshot\\cli\\bin\\lando.js:0:0)\r\n    at Module._compile (pkg/prelude/bootstrap.js:1226:22)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:503:32)\r\n    at tryModuleLoad (module.js:466:12)\r\n    at Function.Module._load (module.js:458:3)\r\n    at Function.Module.runMain (pkg/prelude/bootstrap.js:1281:12)\r\n    at startup (bootstrap_node.js:200:16)\r\n    at bootstrap_node.js:617:3\r\n```\r\n\r\nI have also tried running a `lando ssh` and manually installing the Platform CLI, using the command `curl -sS https://platform.sh/cli/installer | php`, and I get some more insights on what the issue really is. Here is the error:\r\n```\r\nlando ssh\r\nwww-data@f4c1f91d272b:/app$ curl -sS https://platform.sh/cli/installer | php\r\nPlatform.sh CLI installer\r\n\r\nEnvironment check\r\n  [*] The PHP version is supported: 7.1.13.\r\n  [*] The \"json\" PHP extension is installed.\r\n  [*] The \"phar\" PHP extension is installed.\r\n  [*] Git is installed.\r\n  [*] The \"openssl\" PHP extension is installed.\r\n  [*] The \"curl\" PHP extension is installed.\r\n  [*] The \"ctype\" PHP extension is installed.\r\n  [*] The \"mbstring\" and/or \"iconv\" PHP extensions are installed.\r\n  [*] The \"allow_url_fopen\" setting is on.\r\n  [*] The \"apc.enable_cli\" setting is off.\r\n\r\nDownload\r\n  Finding the latest version...\r\n  Downloading version 3.26.1...\r\n  Checking file integrity...\r\n  Checking that the file is a valid Phar (PHP Archive)...\r\n\r\nInstall\r\n  Making the Phar executable...\r\n  Moving the Phar to your home directory...\r\n\r\nError (2): rename(/app/platform.phar,/var/www/.platformsh/bin/platform): Operation not permitted\r\n```\r\nApparently, the file move is no longer permitted. This used to work in **beta.32** and below. Has anything changed since then?\r\n\r\nHere is my `.lando.yml` file:\r\n```\r\n# Name the application the same as in your .platform.app.yaml.\r\nname: ixia-comm\r\n# Use the recipe appropriate for your application.\r\nrecipe: drupal8\r\n\r\n# The following additional build step will install the Platform CLI\r\n# in the application container.\r\nservices:\r\n  appserver:\r\n    build:\r\n      - \"curl -sS https://platform.sh/cli/installer | php\"\r\n\r\n# The following entry creates a `lando platform` command that will run\r\n# any Platform CLI command from inside the container if desired. \r\ntooling:\r\n  platform:\r\n    service: appserver\r\n    description: Run Platform CLI commands\r\n    cmd:\r\n      - /var/www/.platformsh/bin/platform\r\n    options:\r\n      passthrough: true\r\n  sync:\r\n    description: Execute script to sync files to the local machine.\r\n    service: appserver\r\n    cmd: /app/scripts/lando-scripts/sync.sh\r\n\r\nconfig:\r\n  # Lando defaults to Apache. Switch to nginx to match Platform.sh.\r\n  via: nginx\r\n\r\n  # Set the webroot to match your .platform.app.yaml.\r\n  webroot: web\r\n\r\n  # Lando defaults to the latest MySQL release, but Platform.sh uses MariaDB.\r\n  # Specify the version to match what's in services.yaml.\r\n  database: mariadb:10.1\r\n```\r\n\r\nDoes anyone have any ideas?"},"comment":{"url":"https://api.github.com/repos/lando/lando/issues/comments/369428947","html_url":"https://github.com/lando/lando/issues/646#issuecomment-369428947","issue_url":"https://api.github.com/repos/lando/lando/issues/646","id":369428947,"user":{"login":"drewf7","id":30166791,"avatar_url":"https://avatars1.githubusercontent.com/u/30166791?v=4","gravatar_id":"","url":"https://api.github.com/users/drewf7","html_url":"https://github.com/drewf7","followers_url":"https://api.github.com/users/drewf7/followers","following_url":"https://api.github.com/users/drewf7/following{/other_user}","gists_url":"https://api.github.com/users/drewf7/gists{/gist_id}","starred_url":"https://api.github.com/users/drewf7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewf7/subscriptions","organizations_url":"https://api.github.com/users/drewf7/orgs","repos_url":"https://api.github.com/users/drewf7/repos","events_url":"https://api.github.com/users/drewf7/events{/privacy}","received_events_url":"https://api.github.com/users/drewf7/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T00:12:40Z","updated_at":"2018-03-01T00:12:40Z","author_association":"NONE","body":"Chiming in with the same error (line for line identical) from a different use case.\r\n\r\nI work on a team at the University of Arizona, and we use Lando for local testing of our custom Drupal distribution.\r\n\r\nOur lando.yml file is as follows:\r\n```\r\nname: ua-quickstart\r\nrecipe: drupal7\r\nconfig:\r\n  webroot: uaqsbuildroot\r\nservices:\r\n  appserver:\r\n    # Runs drush make within the lando docker container, thereby bypassing the file system issues encountered on windows\r\n    build:\r\n      - \"cd $LANDO_MOUNT && drush make build-ua_quickstart.make.yml $LANDO_WEBROOT\"\r\n      # This command installs drupal with the ua_quickstart install profile.\r\n      - \"drush si ua_quickstart --root=$LANDO_WEBROOT --account-mail=noreply@email.arizona.edu --account-name=uaqs_admin --account-pass=[redacted] --db-url=mysqli://drupal7:drupal7@database:3306/drupal7 --site-name='UA Quickstart' ua_quickstart_install_options_form.uaqs_verbosity=1 -y --verbose\"\r\n      # Fix filesystem permissions and ownerships.\r\n      - \"find $LANDO_WEBROOT/sites/default/files ! -name '\\\\.*' -exec chgrp $LANDO_WEBROOT_GROUP {} \\\\;\"\r\n      - \"find $LANDO_WEBROOT/sites/default/files -type d -exec chmod 2775 {} \\\\;\"\r\n      - \"find $LANDO_WEBROOT/sites/default/files ! -name '\\\\.*' -a -type f -exec chmod 664 {} \\\\;\"\r\n```\r\nI haven't yet determined which command is causing the error to appear (although I will be doing further testing). Similar to @mattpaz experience though, everything does seem to work fine if I again run `lando start`. \r\n\r\nI have tested this with identical results on two computers, both running Windows 10 Enterprise. One with Lando v3.0.0-beta.35 and one with Lando v3.0.0-beta.36.\r\n\r\nLet me know if there is anymore information I can provide to help.\r\n"}}
{"actor":{"display_login":"drewf7"}}