Installing hugo as snap on a Ubuntu Core system

I am using Ubuntu core 16.04.1 and the hugo snap hugo 0.18.1.

To get started with hugo I type: “hugo new site webpage” and the output is (see Output below).

The possibilities to tweak the system are limited in Ubuntu Core. I did the following:

  1. create the directory myself (worked)
  2. use option --force (worked, at least gave no negative result)

But after (2.) the directory “webpage” is empty.

Has anyone any idea?
Regards, Matthias


2017/01/12 14:45:36 mkdir /writable/user-data/matthias/webpage/: permission denied
panic: mkdir /writable/user-data/matthias/webpage/: permission denied

goroutine 1 [running]:
panic(0x668ef0, 0x10d247a8)
/usr/lib/go-1.6/src/runtime/panic.go:481 +0x330
log.Panicln(0x10d47a94, 0x1, 0x1)
/usr/lib/go-1.6/src/log/log.go:334 +0xa4, 0xb37f08, 0x10e63380, 0x37, 0x7549c2e0, 0x10e0dd20, 0x7549e0d8, 0x10e0dd60)
/build/hugo/parts/hugo/go/src/ +0x290, 0x37, 0x7549c2e0, 0x10e0dd20, 0x7549c458, 0xb37f08, 0x0, 0x0)
/build/hugo/parts/hugo/go/src/ +0x54, 0x2b, 0x787a80, 0x4, 0x0, 0x0)
/build/hugo/parts/hugo/go/src/ +0x428, 0x2b, 0x0, 0x0, 0x0)
/build/hugo/parts/hugo/go/src/ +0xc7c, 0x10d24718, 0x1, 0x1, 0x0, 0x0)
/build/hugo/parts/hugo/go/src/ +0x2e8*Command).execute(0xb24078, 0x10d246b8, 0x1, 0x1, 0x0, 0x0)
/build/hugo/parts/hugo/go/src/ +0x514*Command).ExecuteC(0xb236e8, 0xb24078, 0x0, 0x0)
/build/hugo/parts/hugo/go/src/ +0x440
/build/hugo/parts/hugo/go/src/ +0x58
/build/hugo/parts/hugo/go/src/ +0x28

Well, kind of works in case you install the hugo snap with the option devmode

snap install hugo --devmode

Ok I got even further: --devmode is not required if one connects the right socket with the right plug in the core snap.

I had to do:
snap connect hugo:home :home

Now I have allowed hugo to access my home directory. Nice security feature but I was not aware of it.

More on interfaces on: