You are not logged in.

#1 2019-06-24 13:10:54

sajmonella9
Member
Registered: 2015-08-26
Posts: 29

Archlinux Httpd + Wordpress ( permission for both)

Hi, like on subject i have problem with my working Local Server on Arch.

So, everything working good. But i have problem with permission on Wordpress on Httpd. For example i try install plugin , theme from Wordpress dashboard. It's okay if i set my "Site" folder as chown -R http.http "DIR_TO_MY_FOLDER" .
But after that i don't have access to my files as my "username" . I need every time write password to edit some files.... . Anyway if i stay on ' chown -R $MYNAME.users "DIR" ' then i have normal access to files but... wordpress try write new folders, plugins etc.. as http user so...  he can't do this. And i need to install manual all things, but on some plugins i need to use Wordpress dashboard even if i don't wanna . So i need solution how to resolve permission access for both users.

On official wiki i just found solution #1 (above) . But isn't help me a lot when i make changes so quickly.

I just use "sudo chown -Rf http.users "DIR_TO_FOLDER_"" And working. But it's possible to add specific user to exist group?

Last edited by sajmonella9 (2019-06-24 13:48:45)

Offline

#2 2019-06-24 13:52:03

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: Archlinux Httpd + Wordpress ( permission for both)

You are almost there.  The content should probably be http:http ownership, but http:users works fine as well.  The key is just that your regular user must then belong to the http or users group.

sajmonella9 wrote:

But it's possible to add specific user to exist group?

Yes.

As a side note, this isn't anything particular to web servers or wordpress.  You just need to allow multiple users to have write access to the same files/directories (without allowing everyone write access).  This is precisely what *nix groups are for.

Last edited by Trilby (2019-06-24 13:54:26)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2019-06-24 14:24:35

sajmonella9
Member
Registered: 2015-08-26
Posts: 29

Re: Archlinux Httpd + Wordpress ( permission for both)

I know that , when i just http.users allow multiple "users" etc. This is why i ask about add user to group . Anyway.... i do this . Change permission folder by http.http and even my user is on http group i can't edit / remove / add any file in this folder. Still need password.

I was thinking this help me but nothing changed. I need restart system? I'm not sure.

Last edited by sajmonella9 (2019-06-24 14:26:59)

Offline

#4 2019-06-24 14:39:44

seth
Member
Registered: 2012-09-03
Posts: 50,957

Re: Archlinux Httpd + Wordpress ( permission for both)

It's probabyl because the files are 644 and not 664

Offline

#5 2019-06-24 14:48:06

sajmonella9
Member
Registered: 2015-08-26
Posts: 29

Re: Archlinux Httpd + Wordpress ( permission for both)

I don't think so, but even i tested and still the same problem. For sure it's problem with access by http group (users) working good. So i don't know . Logic of that simple solution can't be wrong.

Summary : my username on http group don't give me permission to files but users yea.

IkUt6LQ.png

Last edited by sajmonella9 (2019-06-24 14:50:30)

Offline

#6 2019-06-24 14:50:14

seth
Member
Registered: 2012-09-03
Posts: 50,957

Re: Archlinux Httpd + Wordpress ( permission for both)

Output of "stat /path/to/file" and "id" - also the group addition will most likely not apply to your current session, you'll have to re-login.

Offline

#7 2019-06-24 14:52:40

sajmonella9
Member
Registered: 2015-08-26
Posts: 29

Re: Archlinux Httpd + Wordpress ( permission for both)

Yeap re login working , this is why i ask about restart system. ( i'm so lazy... ) but i don't wanna restart system every small changes. (It's no a Windows!!)

Summary :

sudo chown -Rv http.http $HOME/Path/To/Dir *

( Working if regular user is added to group by simple one command ) . Thanks for help and tips. And of course yours time boys.

Last edited by sajmonella9 (2019-06-24 14:54:46)

Offline

#8 2019-06-24 14:58:43

seth
Member
Registered: 2012-09-03
Posts: 50,957

Re: Archlinux Httpd + Wordpress ( permission for both)

What do you think that command and in particular the globbing at the end does?

You don't have to reboot and actually not even t re-login, but you'll usually have to start a new login shell (and launch programs from there)

Offline

Board footer

Powered by FluxBB