Fix write and delete permissions