LAB: Change the default database path. I cannot change owner of /var/mongodb/db to vagrant

Logged in as superuser in order to create directory. mkdir was successful

sh-3.2# mkdir -m 0777 -p /var/mongodb/db
sh-3.2# ls /var
agentx empty log netboot rwho
at folders ma networkd spool
audit install mail root tmp
backups jabberd mongodb rpc vm
db lib msgs run yp
sh-3.2# chown vagrant:vagrant /var/mongodb/db
chown: vagrant: illegal group name
sh-3.2# chown vagrant:everyone /var/mongodb/db
chown: vagrant: illegal user name

vagrant is not listed as a group name

(base) Howards-MBP:m103-Vagrant-env howardtarko$ groups
staff everyone localaccounts _appserverusr admin _appserveradm _lpadmin _appstore _lpoperator _developer _analyticsusers

What am I doing wrong?


vagrant user exists on Vagrant unix box
Looks like you are trying it on your local host

Thanks @Ramachandra_37567,

Hi @Howard_84497, I hope you found @Ramachandra_37567’s response helpful. Please let me know if you are still having any issue.

Shubham Ranjan
Curriculum Services Engineer