apply permissions before restarting nginx