[opensuse] help me understand directory rights, please...
Hi, How can I make a directory to allow write access for me (user) and wwwrun, but not for everybody else? background: I have kind of a self made cms in php that creates my web pages and writes them into directories on my local computer. If these are my own directories their rights are drwxr-xr-x and therefore wwwrun cannot write into them. If I give write rights to everyone, then wwwrun can write into the directory, of course. But how can I achieve, that *only* me and wwwrun can write into that directory? thanks for your hints. Daniel -- Daniel Bauer photographer Basel Switzerland professional photography: http://www.daniel-bauer.com Madagascar special: http://www.sanic.ch -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Daniel Bauer wrote:
Hi,
How can I make a directory to allow write access for me (user) and wwwrun, but not for everybody else?
background:
I have kind of a self made cms in php that creates my web pages and writes them into directories on my local computer. If these are my own directories their rights are drwxr-xr-x and therefore wwwrun cannot write into them. If I give write rights to everyone, then wwwrun can write into the directory, of course.
But how can I achieve, that *only* me and wwwrun can write into that directory?
thanks for your hints.
Daniel
You could do something like: chown -R username.group /path/to/folder # Folder and files owned by you (Recursively) chmod -R 700 username.group /path/to/folder # Folder and files only accessible to you (rwx) setfacl -R -m u:wwwrun:rwx /path/to/folder # Folder and files also accessible to wwwrun (rwx) setfacl -R -m d:u:wwwrun:rwx /path/to/folder # New folders and files will also be accessible to wwwrun (rwx) Please read the man pages of chmod and setfacl / getfacl before applying the new acl's, and changing your current file permissions. I'm not sure if this is the best way to do it, perhaps others on the list have better ways of doing it. Best regards Sylvester Lykkehus -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
How can I make a directory to allow write access for me (user) and wwwrun, but not for everybody else?
background:
I have kind of a self made cms in php that creates my web pages and writes them into directories on my local computer. If these are my own directories their rights are drwxr-xr-x and therefore wwwrun cannot write into them. If I give write rights to everyone, then wwwrun can write into the directory, of course.
If you use a cms, only wwwrun would need to have write access to the directory. Why don't use change the owner to wwwrun?
But how can I achieve, that *only* me and wwwrun can write into that directory?
www being wwwrun's group chown -R me.www /path_to/your_folder chmod -R 775 /path_to/your_folder Regards, Gaël
participants (3)
-
Daniel Bauer
-
Gaël Lams
-
Sylvester Lykkehus