The problem with VMWare shared folders is that you can’t specify the owner/group so the default ends up being
root for both. This isn’t ideal, for instance, if we’re sharing web files that need to be owned by Apache in order to be served. Piggybacking off a comment from this post, here’s how to specify the owner/group of a shared folder:
- Ensure VMWare Tools is installed.
What this does is append
/etc/fstab to specify how
/mnt/hgfs should be mounted in terms of ownership.
33 is Apache’s
www-data user on Debian-based distrobutions.
/mnt/hgfs is then re-mounted with new ownership.
DO $$ DECLARE current_table text; BEGIN FOREACH current_table IN ARRAY ARRAY['table1', 'table2'] LOOP EXECUTE format('DELETE FROM %I WHERE foo = %L', current_table, 'bar'); END LOOP; END $$;