title: PHP Artisan Tinker Cannot Write to Config Path
body: <p>I have used Tinker before but suddenly it stopped working, no matter what project, what version, new or existing. I am on a macbook pro 2013, mac os Sierra, iterm2 with zsh. I have researched all over and not found anything of relevance with exception of one reference in stack overflow to <a href="https://github.com/bobthecow/psysh/issues/382" rel="nofollow noreferrer">https://github.com/bobthecow/psysh/issues/382</a> which doesn't show resolution, is not laravel specific but seems to be involving the psy shell (all other artisan commands are fine): </p>
  
  <p>vagrant@homestead:~/Code/application$ php artisan tinker</p>
  
  <pre><code>  [ErrorException]
    Writing to /home/vagrant/.config/psysh is not allowed.
  </code></pre>
  
  <p>Is the error I am shown. Vagrant is set up through virtual box running homestead-7.</p>
  
  <p>When I ssh into vagrant and ls -la I see the .config folder but cannot access it nor can I mkdir mvdir due to access denied errors. (Which if I am learning from the stack trace below is where the error is being triggered? Top of the trace where the touchfilemkdir is at?) The folder itself is owned by vagrant. I can make out where the error is triggering but I don't know why it could possibly be triggering regardless of what version of laravel I use, whether it is an existing project or a new download.</p>
  
  <p>Within the laravel projects themselves, I have</p>
  
  <pre><code>"laravel/tinker": "~1.0", 
  </code></pre>
  
  <p>in the composer.json and</p>
  
  <pre><code>/*
   * Package Service Providers...
   */
      Laravel\Tinker\TinkerServiceProvider::class
  </code></pre>
  
  <p>is located in app/cofig/app.php.</p>
  
  <p>I did run a verbose stack trace though I'm not exactly sure just what it is pointing to as to what has broken or why.</p>
  
  <pre><code>Exception trace:
       () at 
  </code></pre>
  
  <p><code>/home/vagrant/Code/lightpointLP/vendor/psy/psysh/src/Psy/ConfigPaths.php:213
   Illuminate\Foundation\Bootstrap\HandleExceptions-&gt;handleError() at n/a:n/a
   trigger_error() at /home/vagrant/Code/lightpointLP/vendor/psy/psysh/src/Psy/ConfigPaths.php:213
   Psy\ConfigPaths::touchFileWithMkdir() at /home/vagrant/Code/lightpointLP/vendor/psy/psysh/src/Psy/Configuration.php:361
   Psy\Configuration-&gt;setHistoryFile() at /home/vagrant/Code/lightpointLP/vendor/psy/psysh/src/Psy/Configuration.php:409
   Psy\Configuration-&gt;getHistoryFile() at /home/vagrant/Code/lightpointLP/vendor/psy/psysh/src/Psy/Configuration.php:546
   Psy\Configuration-&gt;getReadline() at /home/vagrant/Code/lightpointLP/vendor/psy/psysh/src/Psy/Shell.php:82
   Psy\Shell-&gt;__construct() at /home/vagrant/Code/lightpointLP/vendor/laravel/tinker/src/Console/TinkerCommand.php:53
   Laravel\Tinker\Console\TinkerCommand-&gt;handle() at n/a:n/a
   call_user_func_array() at /home/vagrant/Code/lightpointLP/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
   Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() at /home/vagrant/Code/lightpointLP/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
   Illuminate\Container\BoundMethod::callBoundMethod() at /home/vagrant/Code/lightpointLP/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
   Illuminate\Container\BoundMethod::call() at /home/vagrant/Code/lightpointLP/vendor/laravel/framework/src/Illuminate/Container/Container.php:539
   Illuminate\Container\Container-&gt;call() at /home/vagrant/Code/lightpointLP/vendor/laravel/framework/src/Illuminate/Console/Command.php:182
   Illuminate\Console\Command-&gt;execute() at /home/vagrant/Code/lightpointLP/vendor/symfony/console/Command/Command.php:264
   Symfony\Component\Console\Command\Command-&gt;run() at /home/vagrant/Code/lightpointLP/vendor/laravel/framework/src/Illuminate/Console/Command.php:167
   Illuminate\Console\Command-&gt;run() at /home/vagrant/Code/lightpointLP/vendor/symfony/console/Application.php:874
   Symfony\Component\Console\Application-&gt;doRunCommand() at /home/vagrant/Code/lightpointLP/vendor/symfony/console/Application.php:228
   Symfony\Component\Console\Application-&gt;doRun() at /home/vagrant/Code/lightpointLP/vendor/symfony/console/Application.php:130
   Symfony\Component\Console\Application-&gt;run() at /home/vagrant/Code/lightpointLP/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:122
   Illuminate\Foundation\Console\Kernel-&gt;handle() at /home/vagrant/Code/lightpointLP/artisan:35</code></p>
  
  <p>If any other information may be required I'll be glad to provide it, I'm truly at a loss as to what has happened or how to fix it.
  Thank you </p>
  
  <p>UPDATE AUGUST 31
  So I have found that when I am in vagrant@homestead and I sudo su when I then am in root@homestead:/home/vagrant# and I enter .config there is a configstore directory and a psysh directory but it was owned by root.  I changed the owner to vagrant, exited, reloaded vagrant and the same error.
  <code>
  drwx------  2 root    root    4096 May  4 00:55 configstore
  drwxr-xr-x  2 vagrant vagrant 4096 Aug 31 23:37 psysh
  </code></p>
  
  <p>So then I tried sudo -i and got root@homestead but found that the contents of .config were different.  This time it has .composer directory and no psysh existing.  So I added the psysh directory with vagrant as owner
  <code>
  drwxr-xr-x 2 root    root    4096 Feb 26  2017 composer
  drwxr-xr-x 2 vagrant vagrant 4096 Aug 31 23:59 psysh
  </code>
  but this still also does not work.  I also exited, reloaded vagrant, I config:cleared on both but I get the same unable to write error.</p>
  
  <p>I am so at a loss, any insight would help, please.  Thanks!</p>