0

I'm running on a Debian-98-stretch-64-LAMP and I'm trying to give my user (admin) the permission to the www-data group that I created. I already invited / added my User into the www-data group but the user still can not write in public_html folder.

What I tried so far: Editing files inside of website.io, I'm always facing the problem where I get the error of permission denied.

This is how the permissions of public_html looks like.

admin@Debian-98-stretch-64-LAMP:~/public_html$ ls -la
total 24
drwxrwsr-x  6 www-data www-data 4096 Jul 23 00:04 .
drwxr-xr-x 14 root     root     4096 Jul 20 19:59 ..
drwxr-sr-x  4 www-data www-data 4096 Jun 14  2019 abc.de
drwxrwsr-x  6 www-data www-data 4096 Jul 21 21:32 website.io
drwxr-sr-x  2 admin    www-data 4096 Jul 23 00:04 xyz.io
drwxr-sr-x  3 www-data www-data 4096 Jul 18 12:57 typo3_sources

Permissions inside of website.io

drwxrwsr-x  8 www-data www-data 4096 Jul 21 11:05 .
drwxrwsr-x  6 www-data www-data 4096 Jul 21 21:32 ..
drwxr-sr-x  3 www-data www-data 4096 Jan 10  2020 02-comming-soon
drwxr-sr-x 10 www-data www-data 4096 Jan 10  2020 _Archiv
drwxr-sr-x  2 www-data www-data 4096 Jan 10  2020 common-css
drwxr-sr-x  2 www-data www-data 4096 Jan 10  2020 common-js
drwxr-sr-x  2 www-data www-data 4096 Jan 10  2020 fonts
-rwxr-xr-x  1 www-data www-data  146 Jul 22 22:39 .htaccess
drwxr-sr-x  2 www-data www-data 4096 Jan 10  2020 images
-rwxr-xr-x  1 www-data www-data 2277 Jul 21 11:05 index.html
-rw-r--r--  1 www-data www-data 1347 Jul 17 13:38 test.php

What causes this type of issue and how can I fix it ?

2
  • Result of id as your user please. If it doesn't contain www-data as a group that's your problem Sep 21, 2020 at 8:49
  • As you can see, files inside website.io do not have group write rights set.
    – FelixJN
    Sep 21, 2020 at 11:30

1 Answer 1

1

Thanks to a comment from Fiximan, I could fix the issue by using:

sudo chmod -R 764 website.io

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .