How to give write permissions to multiple users?

Solution 1:

You can change the group of the files:

groupadd webusers
usermod -aG webusers the_user_name
chgrp -R webusers the_directory
chmod g+s the_directory

If this is a RedHat based distribution you can use setfacl to do this without a group and set it to happen by default:

setfacl -R -m user:the_username:rwx directory_name
setfacl -d -R -m user:the_username:rwx directory_name

Solution 2:

Allowing a group of users to maintain a set of files is one thing: you just set add them to a common group and set the ownership of the existing files and directories to that group, then set the sticky group bit on any directories (subsequently files should be added as writeable by the group by default).

Now I have to make this file writable by the web server

You need to be very careful and very selective about what files you make writeable by the webserver to avoid code injection issues - do NOT add the webserver uid to the user group defined above - keep these files completely separate from the other content on the website (i.e. in a seperate directory with all cgi / php etc disabled), preferably outside the document root completely. Most FTP servers allow you to set the upload permissions (0666 for files, 0777 for directories) and/or set the other sticky bit on directories.

C.