Welcome to the forums.
Unix and Linux are multi-user operating systems. This means that every file, directory and process runs with a specific userid and a specific groupid. Management of users and groups is a fundamental skill for Unix security and running any server.
There are tutorials for learning directory and file permissions, but really the best way to learn them is to create 3 userids and 3 groups then mix and match which users are in which groups. Then create a temporary set of files and directories and spend 45 minutes using chmod and chgrp trying every possible combination of permissions, groups on the files, directories and files inside the directories.
Until you take the time to do that stuff, owners, groups and permissions will always seem a mystery. Hours, days, weeks, months of frustration will happen until you learn it. It is central to everything on a server. Practice is the only way, but until you get the 'ah ha' moment, it won't stick. Unix permissions are very elegant.
I wouldn't use bind-mounts when something as simple as proper group management is all that you need. In 25 yrs as a Unix admin, I've used bind-mounts less than 5 times and not at all right now. They are a dangerous hack, IMHO. Heck, I'd rather see ACLs used instead of bind-mounts.
Working together on Unix:
* Put everyone into the same group (perhaps www-data is what you want?).
* Create a directory where they can share files (somewhere for apache?).
* Make the group on that empty directory have rws permissions
Code:
$ sudo gpasswd -M user1,user2,user3 ourgroup
$ mkdir -p /tmp/Workspace
$ cd /tmp/
$ chmod g=rwxs Workspace
$ ls -Fl Workspace
drwxrws--- owner group Workspace/
$ chgrp ourgroup Workspace
$ ls -Fl Workspace
drwxrws--- owner ourgroup Workspace/
Obviously, you'll want to learn this in a temporary place and see that it works fine.
If you want to make getting from a HOME directory to an apache static files directory easy, use a symbolic link.
Code:
$ cd ; ln -s /tmp/Workspace
That will make a ~/Workspace link.
And my last piece of advice is to remove and purge any plain FTP server from your system. Use ssh and sftp instead. sftp provides an FTP-like interface, but doesn't transmit logins or data unencrypted. Plain FTP should have died out by 2000 and if the webhost doesn't support sftp, then you should fire them. There are many other reasons NOT to use plain FTP. Google will find those.
IMHO.
Good luck.
Bookmarks