New on LowEndTalk? Please Register and read our Community Rules.
linux permissions
Hi.
This is the contents of
**var --> www --> html
**
(I had to use --> because cloudflare kept blocking me from posting if i used / )
drwxrwxr-x 4 apache apache 4096 Apr 12 15:41 . drwxr-xr-x 6 root root 4096 Mar 22 15:04 .. drwxrwxr-x 2 apache apache 4096 Apr 12 15:05 configs -rw-r--r-- 1 apache apache 11916 Apr 12 15:41 configs.zip -rw-rw-r-- 1 apache apache 6 Apr 11 20:09 index.php drwxrwxr-x 2 apache apache 4096 Apr 12 15:41 tools
I have a user, let's call it george.
George's home directory is
var --> www --> html--> configs
I need george to be able to write files to his home directory.
How can I make sure that both george and apache have write permissions to that directory?
finger george Login: george Name: Directory: var-->www-->html-->configs--> Shell: -->bin-->bash
Comments
Add user george to group apache
gpasswd -a george apache
Or you can add another group called 'config_write', then do
chown apache:config_write your_directory
and add both apache and george to config_write group
gpasswd did the trick Thanks!
the second way should be the only one choosen, because you would not want george to be able to read and maybe write everything that apache (group) is allowed to, would you?
I wouldn't, but maybe @xaitmi would.
You could also apply user/group permissions: e.g., make configs owned (and writable) by george but writable by the apache group:
Something like that. I'm not sure it's a good idea to put george's home directory under var-www; better just to make the config directory accessible to him.