Fix permissions to enable session handling