Adding more space to NC (Ubuntu)

Hello,

What are the chmod commands given and at what location.

you probably ran the command

sudo -u www-data php occ files:scan --help

in your home or root directory and not from your NC installation directory.

for restoring permission

Also check this post and consider lvm for the future