Fix resources permissions (#558)