Not sure how Virtualmin configures users and permissions, but there's an easy way to find out.
Create a file with the following content, and name it whoami.php
Code:
<?php passthru('whoami'); ?>
Place it in your Wordpress public_html directory, and browse to it. It'll display the name of the user who is running the script. DELETE THE FILE IMMEDIATELY, AS IT MAY BECOME A SECURITY PROBLEM IF SOMEONE ELSE SEES IT.
Then you can chown the Wordpress files so that the said user can modify them.
If this doesn't work, check if you have safe_mode enabled or disabled in your PHP configuration.
BTW, I don't think it's a good idea to chown the entire public_html directory. Most of the time, Wordpress only needs to write inside the wp-content directory. The only exception is when Wordpress wants to update itself, or when a plugin wants to modify the .htaccess file. Those cases don't happen very often, so you should normally keep those files from being writable.