-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permission error when running docker exec -it servas php artisan key:generate --force
#81
Comments
I managed to solve this (with the help of ChatGPT) by opening a shell inside the container and manually changing the ownership of the However, I wonder if this is the best solution. I am running it locally now, so there are no security concerns. But is this solution still good if I were to run it on a VPS? In other words: would it be a potential problem if the owner of the Steps of the quick fix:
|
Thank you for the detailed bug report. |
Hey beromir, thanks for your quick reply. I honestly thought I'd have to wait several days and I appreciate your willingness to help! I'm sorry if I'm late to reply, but I currently have exams, so I don't check github as often. That said, it's owned by /var/www/html # ls -l .env
-rw-r--r-- 1 1000 1000 348 Jan 21 08:29 .env Also, minor point: I think you forgot the first slash in |
Faced the same issue! Permissions are exactly how Ibrahim describes for me too! |
I was able to reproduce the error. The problem is the different file ownership on the host machine. |
When running
docker exec -it servas php artisan key:generate --force
I get the following error:Steps to reproduce:
docker-compose.yaml
and.env
respectively..env
(see contents of both files below).docker-compose up -d
successfully. I get the following output:[+] Running 4/4 ✔ Network servas_mariadb_default Created 0.0s ✔ Volume "servas_mariadb_servas-db-data" Created 0.0s ✔ Container servas_mariadb-db-1 Started 0.0s ✔ Container servas Started 0.0s
docker exec -it servas php artisan key:generate --force
, which gives the above mentioned error.I tried with the SQLite container and got the same problem.
I also tried several approaches, like:
docker-compose.yaml
and.env
and rundocker-compose up -d
from within thedocker
directory anddocker/sql-example
directory respectively..env
to777
(to make it readable, writeable and even executable by everyone).docker-compose.yaml
and.env
, like: giving the full path instead of./.env
in thevolumes
section ofdocker-compose.yaml
.Unfortunately, nothing was able to solve the problem. Reading from the error, I assume it's a problem with the
.env
file not being writeable in the container, however I am not familiar enough with containers and PHP/Laravel to be able to solve it on my own. I'd love to use this bookmarks manager as it seems to be the only one I found which meets my needs (self-hosted + nested groups). Thanks in advance for your time to help me solve this..env
content:docker-compose.yaml
(it's identical to the default):General info about my system:
The text was updated successfully, but these errors were encountered: