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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]