Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 19, 2026

Running php artisan tinker fails with "Writing to directory /home/deploy/.config/psysh is not allowed" because PsySH's config directory doesn't exist and isn't owned by the deploy user.

Changes

  • Create /home/${USER}/.config/psysh directory in the base stage
  • Set ownership of .config directory to the deploy user
&& mkdir -p /home/${USER}/.config/psysh \
&& chown -R ${USER}:${USER} /home/${USER}/.config \

This ensures both dev and prod images have the necessary directory structure for PsySH to write its configuration and history files.

Original prompt

This section details on the original issue you should resolve

<issue_title>Writing to directory /home/deploy/.config/psysh is not allowed.</issue_title>
<issue_description>Mounting a laravel app into /app and running "php artisan tinker" throws the following error:
Writing to directory /home/deploy/.config/psysh is not allowed. </issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: munezaclovis <51137458+munezaclovis@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix directory write error in Laravel Tinker Fix psysh config directory permissions for Laravel Tinker Jan 19, 2026
Copilot AI requested a review from munezaclovis January 19, 2026 21:21
@munezaclovis munezaclovis marked this pull request as ready for review January 19, 2026 21:24
@munezaclovis munezaclovis merged commit f4111e9 into main Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Writing to directory /home/deploy/.config/psysh is not allowed.

2 participants