I'm about to copy some site specific files (custom error pages) to all of my user's public_html directories. I still want my users to be able to use their own custom error pages so I need to chown all of the files to match my user's accounts (I'm using suPHP) so they can delete/overwrite them if they want to later. Is there a way to get the username from another file or directory and chown the ###.shtml files to match that?
You'd need to write a simple shell script to go through each home directory and chown the files in question to match the owner of the directory. Have a google and you should be able to find what you need.
█ Accelerated Hosting - From Constant Internet
█ Automatically serving your website from the nearest server
█ Get hosted on our global network! America / Europe / Asia