1

I followed this wonderful Stackoverflow answer to set up my Laravel's permissions on my Webserver (using the www-data group and user).

When I ssh to my server, I am logged in as admin user. I added this user to the www-group:

sudo usermod -a -G www-data admin

but I am not able to create a file in my Laravel's root folder:

➜  laravel git:(production) ✗ touch test
touch: cannot touch 'test': Permission denied
➜  laravel git:(production) ✗ whoami
admin
➜  laravel git:(production) ✗ ls -la
total 1164
drwxr-xr-x  17 www-data www-data   4096 Jun 23 13:39 .

What do I need to change to be able to have www-data permissions as admin user?

Not only what do I need to do: What is the best and secure practice?

my idea:

sudo chmod g+w .

This works but this is not following the recommendation.

I am running in this issue because I use GitHub actions to deploy my production server and GitHub uses ssh as admin user.

JanBoehmer
  • 395
  • 3
  • 14
  • The file is group readable/executeable, but not group writable – aynber Jun 23 '22 at 15:56
  • Read further down in the answer where it shows how to give better permissions (664 and 775) as well the section below that – aynber Jun 23 '22 at 15:58

0 Answers0