Allegedly, on or about 25 March 2014, Rafnews sent:
i'm trying to figure out what is the best approach for files and
folders
permissions in case of a shared webserver.
we are 2-3 developers and we have a server on which we installed Fedora
20 as web server for our development testing purpose.
all websites should be stored in /var/www/html/ directory
now let's say we are 2 devs called: "alain" and "francois" (those
are
our fedora user accounts.
/var/www/html/ owner is root:root
now what should we do to allow each dev to use FTP and created/delete/
modify files and folders to create website structure ?
should we create a group like and add into it devs ?
I presume that you want to have those users jointly working on several
websites inside that path, not owning their own websites, individually.
You can create say a "webmaster" user group (the name is arbitrary, but
that example fits tradition), add alain and francois to that group, and
have /var/www/html/ owned by that group (/var/www/html doesn't need to
be owned by root:root).
That takes care of direct access to files (ssh to the server, and
working directly on the same machine). And, for ftp, you use a server
that can work with group ownerships.
If you're stuck with servers that don't handle groups, then you could
simply have a webmaster username that owns the files and directories,
and have your webmasters ftp into the server using "webmaster" as the
logon name (or any other shared name other than their own).
--
[tim@localhost ~]$ uname -rsvp
Linux 3.9.10-100.fc17.x86_64 #1 SMP Sun Jul 14 01:31:27 UTC 2013 x86_64
All mail to my mailbox is automatically deleted, there is no point
trying to privately email me, I will only read messages posted to the
public lists.
George Orwell's '1984' was supposed to be a warning against tyranny, not
a set of instructions for supposedly democratic governments.