I would like to allow users to upload new versions of documents via a web app. However, the permissions are not currently set up to allow any file within the particular folder to be overwritten by default. Is there a way to set up the default permissions or other settings of all current and future files to automatically be replaced by a new file with an identical name, and path obviously.
Edit: I am obviously not referring to the entire www folder! Just a subfolder :-)
To answer your question, you just need to make sure that the Apache user (usually named apache or nobody) has write permission to the directories. For example, chgrp -R apache /var/www/userdir && chmod -R 0775 /var/www/userdir
However, if this server is publicly accessible, it's a very bad idea to do this. Instead, you'll want to look into something like suPHP, which allows Apache to run as the user and will allow user-uploaded files to be overwritten.