Permission denied @ rb_sysopen when start MongoDB

hi there!
I’ve an issue while installing MongoDB in my Mac m1chip 2020.

I run:
brew services start mongodb-community
and got error:
Permission denied @ rb_sysopen - /Users/pg/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist

I try to fixed by:
sudo chown $(whoami) ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist

but this is return:
chown: /Users/pg/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist: No such file or directory

can anyone please help me with this.

Where is your data directory set ?
If MongoDB is installed on macOS via Homebrew, the default data directory depends on the type of processor in the system. For your Apple M1 Processor you should change ownership of the /opt/homebrew/var/mongodb directory. Or review which permissions are currently set.