Q:

Unable to create/open lock file, Permission denied Is a mongod instance already running

Unable to create/open lock file, Permission denied Is a mongod instance already running? 
Showing the following error,
/Users/hackintosh01/.rvm/gems/ruby-2.4.1/bin:/Users/hackintosh01/.rvm/gems/ruby-2.4.1@global/bin:/Users/hackintosh01/.rvm/rubies/ruby-2.4.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Volumes/Mac\ Data/mongodb/bin/:/opt/X11/bin:/Users/hackintosh01/.rvm/bin:/usr/local/mysql/bin
    Hackintoshs-iMac-2:~ hackintosh01$ mongod
    2018-02-28T17:54:21.814+0530 I CONTROL  [initandlisten] MongoDB starting : pid=18926 port=27017 dbpath=/data/db 64-bit host=Hackintoshs-iMac-2.local
    2018-02-28T17:54:21.815+0530 I CONTROL  [initandlisten] db version v3.2.10
    2018-02-28T17:54:21.815+0530 I CONTROL  [initandlisten] git version: 79d9b3ab5ce20f51c272b4411202710a082d0317
    2018-02-28T17:54:21.815+0530 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2j  26 Sep 2016
    2018-02-28T17:54:21.815+0530 I CONTROL  [initandlisten] allocator: system
    2018-02-28T17:54:21.815+0530 I CONTROL  [initandlisten] modules: none
    2018-02-28T17:54:21.815+0530 I CONTROL  [initandlisten] build environment:
    2018-02-28T17:54:21.815+0530 I CONTROL  [initandlisten]     distarch: x86_64
    2018-02-28T17:54:21.815+0530 I CONTROL  [initandlisten]     target_arch: x86_64
    2018-02-28T17:54:21.815+0530 I CONTROL  [initandlisten] options: {}
    2018-02-28T17:54:21.826+0530 I STORAGE  [initandlisten] exception in initAndListen: 98 Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instance already running?,  terminating
    2018-02-28T17:54:21.826+0530 I CONTROL  [initandlisten] dbexit:  rc: 100
    Hackintoshs-iMac-2:~ hackintosh01$ mongod --dbpath /data/db
    2018-02-28T17:57:24.572+0530 I CONTROL  [initandlisten] MongoDB starting : pid=18935 port=27017 dbpath=/data/db 64-bit host=Hackintoshs-iMac-2.local
    2018-02-28T17:57:24.573+0530 I CONTROL  [initandlisten] db version v3.2.10
    2018-02-28T17:57:24.573+0530 I CONTROL  [initandlisten] git version: 79d9b3ab5ce20f51c272b4411202710a082d0317
    2018-02-28T17:57:24.573+0530 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2j  26 Sep 2016
    2018-02-28T17:57:24.573+0530 I CONTROL  [initandlisten] allocator: system
    2018-02-28T17:57:24.573+0530 I CONTROL  [initandlisten] modules: none
    2018-02-28T17:57:24.573+0530 I CONTROL  [initandlisten] build environment:
    2018-02-28T17:57:24.573+0530 I CONTROL  [initandlisten]     distarch: x86_64
    2018-02-28T17:57:24.573+0530 I CONTROL  [initandlisten]     target_arch: x86_64
    2018-02-28T17:57:24.573+0530 I CONTROL  [initandlisten] options: { storage: { dbPath: "/data/db" } }
    2018-02-28T17:57:24.585+0530 I STORAGE  [initandlisten] exception in initAndListen: 98 Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instance already running?,  terminating
    2018-02-28T17:57:24.585+0530 I CONTROL  [initandlisten] dbexit:  rc: 100

A:

Checked with the permissions for the /data/db folder, and now its works fine. 
sudo chmod 777 /data/db
Updated
Changed ownership to specific user

sudo chown -R <USERNAME> /data/db

