About to fork child process, waiting until server is ready for connections. forked process: 53068 ERROR: child process failed, exited with 1 To see additional information in this output, start without the "--fork" option

Using a Mac M2, after installing Mongodb and trying to configure parameters for db and log am getting this error. Can anyone please help me with this? I used this command to check
" mongod --dbpath ~/data/db --logpath ~/data/log/mongodb/mongo.log --fork "

checked the logs " Failed to unlink socket file",“attr”:{“path”:“/tmp/mongodb-27017.sock”,“error”:“Permission denied”}} "

Check permissions/ownership of this file
ls -lrt /tmp/mongodb-27017.sock