Mycroft.conf "Permission Denied"

I couldn’t change the location of my Mark 1 through the web gui and as I try to change the mycroft.conf file to the right geolocation I get a permissions denied error… The file owner is mycroft or root and logging in as the default pi user is not allowing me to modify that file.

What is the proper login to use with WINSCP?


The way I understand it the Mycroft user doesn’t have a password by default and the permissions are set to:

-rw-r--r-- 1 mycroft mycroft 185 Jun 30 14:45 mycroft.conf

So the only user who can read/write is the user “mycroft”.

You can probably hack something together with a bunch of flags on the CLI to give you access as the “pi” user ( who is allowed to log in remotely ), but you might want to simply change the permissions on the file and add the “pi” user to the Mycroft group.

To do this:

  1. Turn on SSH via the device menu ( hold the button for 2 seconds, advance to SSH and switch it to “ALLOW” )

Log in via SSH as the pi user ( for SSH on windows use PuTTY )

username: pi
password: mycroft

Now change the permissions of the file:

sudo chmod 664 /home/mycroft/.mycroft/mycroft.conf

Now add the pi user to the mycroft group:

sudo adduser pi mycroft

Verify that things worked:

groups pi

Which should return:

‘pi : pi adm dialout cdrom sudo audio video plugdev games users input netdev spi i2c gpio mycroft’

Now you should be able to SCP as “pi” and change the settings. I trust you are using Notepad++ or similar? That allows you to simply save directly to the file via SCP. Awesome tool for a mixed Windows/Linux env.

That did not work. Same permissions denied error. I also rebooted the pi. Yes, using notepad++ Weird, everything was entered right and pi is now part of the mycroft group.

pi@mark_1:~ $ The user pi' is already a member of mycroft’.

pi@mark_1:~ $ groups pi
pi : pi adm dialout cdrom sudo audio video plugdev games users input netdev spi i2c gpio mycroft
pi@mark_1:~ $

@oakguy Weird that doesn’t work, but another solution is to be the mycroft user when you modify the file.

sudo su mycroft - change mycroft user

Then modify the mycoft.conf file.

exit - to go back to pi user

Hope that helps

It sure did! Thanks!

Just to clarify ( so that the next dev who runs into this problem has a solution ), did you change the permissions of the mycroft.conf file to 664? Could you do a:

ls -larth’

and share the results?