mpc-js-node icon indicating copy to clipboard operation
mpc-js-node copied to clipboard

currentPlayer.add rises "Access denied" error

Open dmytro-shchurov opened this issue 4 years ago • 0 comments

I'm creating an Electron application in Arch. When I run in a console mpc add <path_to_my_file> as a current user, not su, everything is fine. However, when I use mpc-js, mpc.currentPlaylist.add(<path_to_my_file>) returns {errorCode: 4, errorMessage: "Access denied"} error object.

Some other database commands works fine, mpc connects successfully.

MPD is started as a system-wide service. File is located in a mounted NTFS directory.

It does not depend on whether I build a production or a debug version.

UPD node application without electron rises the same error. I do not understand how to properly use this lib. Local files also do not work.

UPD2 Without additional access right management, Unix sockets work great. So, if MPD is bound to a Unix socket, and I use mpc.connectUnixSocket(), I can call mpc.currentPlayer.add() command then

dmytro-shchurov avatar Jul 13 '21 17:07 dmytro-shchurov