Page 1 of 1

Rights for a website (chown)

Posted: Wed Apr 12, 2017 4:38 pm
by floown
Hello,

If I do a : chown -R admin:admin /home/admin/web/domain.com/public_html I'm redirect automaticaly to the install.php of a Drupal already installed.

So I can only do a : chown -R admin:www-data /home/admin/web/domain.com/public_html and the site is reachable. But if I use a script to recreate my cache (drush hss) the rights become : anothersshuser:www-data
What's the problem ?

Thx

Re: Rights for a website (chown)

Posted: Sun May 28, 2017 3:33 am
by BBuchanan1013
What does this output?

Code: Select all

ls -la /home/admin/web/domain.com/public_html

Re: Rights for a website (chown)

Posted: Sun May 28, 2017 5:14 am
by floown
Hello,

I have modify my firt post.

Code: Select all

$ ls -la /home/admin/web/mydomain.com/public_html/cache/normal                   
total 16
drwxrwxrwx  4 admin www-data 4096 May 19 03:35 .
drwxrwxrwx  3 admin www-data 4096 Jan 21  2014 ..
drwxrwxr-x 10 admin www-data 4096 May 28 07:00 www.mydomain.com

$ ls -la /home/admin/web/mydomain.com/public_html/cache/normal/www.mydomain.com
total 796
drwxrwxr-x 10 admin   www-data  4096 May 28 07:00 .
drwxrwxrwx  4 admin   www-data  4096 May 19 03:35 ..
drwxrwxr-x  2 anothersshuser www-data  4096 May 28 06:35 agence-communication
-rw-rw-r--  1 anothersshuser www-data 34498 May 28 06:44 agence-communication_.html
-rw-rw-r--  1 anothersshuser www-data 26455 May 28 06:38 alsace-bas-rhin_.html
-rw-rw-r--  1 anothersshuser www-data 26684 May 28 06:44 appetit-mise_.html
drwxrwxr-x  2 anothersshuser www-data  4096 May 28 06:38 blog
Like you can see, the rights has changed when I make a 'drush hss' command to rebuild the cache for my Drupal 7 site. I want that right stay to admin:www-data

Thx for your help

Re: Rights for a website (chown)

Posted: Tue Jun 13, 2017 8:46 am
by tjebbeke
user and group of the files are the same as the user.

This is correct:
chown -R admin:admin /home/admin/web/domain.com/public_html