set permissions correctly on plugins