Q:

Permission denied when trying to run unprivileged LXC container

I have a version 2.0.0 of LXC containers installed on my Pi. I was able to create a container no problem without having to use sudo. However when I try to run the container I'm getting the following set of errors. 
      lxc-start u1 20161216110429.965 ERROR    lxc_cgfs - cgroups/cgfs.c:lxc_cgroupfs_create:1022 - Permission denied - Could not create cgroup '/lxc' in '/sys/fs/cgroup/freezer'.
      lxc-start u1 20161216110429.965 ERROR    lxc_cgfs - cgroups/cgfs.c:cgroup_rmdir:209 - Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/debug/
      lxc-start u1 20161216110429.966 ERROR    lxc_cgfs - cgroups/cgfs.c:cgroup_rmdir:209 - Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/pids/
      lxc-start u1 20161216110429.966 ERROR    lxc_cgfs - cgroups/cgfs.c:cgroup_rmdir:209 - Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/perf_event/
      lxc-start u1 20161216110429.966 ERROR    lxc_cgfs - cgroups/cgfs.c:cgroup_rmdir:209 - Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/net_cls/
      lxc-start u1 20161216110429.966 ERROR    lxc_cgfs - cgroups/cgfs.c:cgroup_rmdir:209 - Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/freezer/
      lxc-start u1 20161216110429.967 ERROR    lxc_cgfs - cgroups/cgfs.c:cgroup_rmdir:209 - Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/devices/system.slice/ssh.service
      lxc-start u1 20161216110429.968 ERROR    lxc_cgfs - cgroups/cgfs.c:cgroup_rmdir:209 - Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/memory/
      lxc-start u1 20161216110429.969 ERROR    lxc_cgfs - cgroups/cgfs.c:cgroup_rmdir:209 - Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/blkio/
      lxc-start u1 20161216110429.969 ERROR    lxc_cgfs - cgroups/cgfs.c:cgroup_rmdir:209 - Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/cpu,cpuacct/
      lxc-start u1 20161216110429.969 ERROR    lxc_cgfs - cgroups/cgfs.c:cgroup_rmdir:209 - Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/systemd/system.slice/ssh.service
      lxc-start u1 20161216110429.969 ERROR    lxc_start - start.c:lxc_spawn:1125 - Failed creating cgroups.
      lxc-start u1 20161216110429.969 ERROR    lxc_start - start.c:__lxc_start:1363 - Failed to spawn container "u1".
      lxc-start u1 20161216110434.976 ERROR    lxc_start_ui - tools/lxc_start.c:main:365 - The container failed to start.
      lxc-start u1 20161216110434.986 ERROR    lxc_start_ui - tools/lxc_start.c:main:367 - To get more details, run the container in foreground mode.
      lxc-start u1 20161216110434.987 ERROR    lxc_start_ui - tools/lxc_start.c:main:369 - Additional information can be obtained by setting the --logfile and --logpriority options.

I have my kernel prepared for LXC as follows:
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enabled
Multiple /dev/pts instances: enabled

--- Control groups ---
Cgroup: enabled
Cgroup clone_children flag: enabled
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled

--- Misc ---
Veth pair device: enabled
Macvlan: enabled
Vlan: enabled
Bridges: enabled
Advanced netfilter: enabled
CONFIG_NF_NAT_IPV4: enabled
CONFIG_NF_NAT_IPV6: enabled
CONFIG_IP_NF_TARGET_MASQUERADE: enabled
CONFIG_IP6_NF_TARGET_MASQUERADE: enabled
CONFIG_NETFILTER_XT_TARGET_CHECKSUM: enabled
FUSE (for use with lxcfs): enabled

--- Checkpoint/Restore ---
checkpoint restore: missing
CONFIG_FHANDLE: enabled
CONFIG_EVENTFD: enabled
CONFIG_EPOLL: enabled
CONFIG_UNIX_DIAG: missing
CONFIG_INET_DIAG: enabled
CONFIG_PACKET_DIAG: missing
CONFIG_NETLINK_DIAG: missing
File capabilities: enabled

I've been at it for days now googling and trying to figure out a solution but no luck so far. 

A:

It seems the normal user can't delete items in /sys/fs/cgroup . You can try to add permissions or make that user owner on that folder recursively with chown yourUser /sys/fs/cgroup -R. Try that, if is not working "play" with chmod. Anyway, it looks as a permissions problem.

