setting data dir correct permissions
comment removed
terminating process opened with Popen