Ubuntu 1804 and Nextcloud Snap

After install and starting it it fails with permission issues.

Please remedy
Thank you

Can you be a little bit more specific?
What snap did you install (there’s more than one) and what exactly is the error you’re seeing, where?

I used the nextcloud server will be more specific on the errors later.in the stock software installer will be more specific later

Thank you

chmod: changing permissions of ‘/tmp/pids’: Operation not permitted
chmod: changing permissions of ‘/var/snap/nextcloud/16402/apache/logs’: Operation not permitted
Making sure nextcloud is setup…
chmod: changing permissions of ‘/tmp/pids’: Operation not permitted
chmod: changing permissions of ‘/tmp/sockets’: Operation not permitted
chmod: changing permissions of ‘/tmp/pids’: Operation not permitted
chmod: changing permissions of ‘/tmp/sockets’: Operation not permitted
chmod: changing permissions of ‘/tmp/locks’: Operation not permitted
chmod: changing permissions of ‘/tmp/pids’: Operation not permitted
chmod: changing permissions of ‘/tmp/sockets’: Operation not permitted
chmod: changing permissions of ‘/var/snap/nextcloud/common/nextcloud’: Operation not permitted
mkdir: cannot create directory ‘/var/snap/nextcloud/common/nextcloud’: Permission denied
chmod: cannot access ‘/var/snap/nextcloud/common/nextcloud/tmp’: Permission denied
chmod: changing permissions of ‘/var/snap/nextcloud/16402/nextcloud/extra-apps’: Operation not permitted
Waiting for PHP…

This is the output when started

What exact commands are you using to install and run the snap?
Also, what’s the output of snap version and snap info nextcloud?

This was a brand new Ubuntu 18.04 and was installed from then Ubuntu Software Center with no commands other then giving the root password. I will get the other info later
Appreciate your help. Apparently I am not the only one running into this.

Thanks. I’m on 19.10 and just installed the snap and it worked fine. I pointed my browser at https://localhost/ and saw the nextcloud web admin.

If you go to the software admin center and look for the comments for next cloud you will see other with the same issues.Also I am on 18.04

ira@ubuntu:~$ snap version
snap 2.42
snapd 2.42
series 16
ubuntu 18.04
kernel 5.0.0-31-generic

ira@ubuntu:~$ snap info nextcloud
name: nextcloud
summary: Nextcloud Server - A safe home for all your data
publisher: Nextcloud✓
contact: https://github.com/nextcloud/nextcloud-snap
license: unset
description: |
Where are your photos and documents? With Nextcloud you pick a server of
your choice, at home, in a data center or at a provider. And that is where
your files will be. Nextcloud runs on that server, protecting your data
and giving you access from your desktop or mobile devices. Through
Nextcloud you also access, sync and share your existing data on that FTP
drive at school, a Dropbox or a NAS you have at home.

  • nextcloud.disable-https
  • nextcloud.enable-https
  • nextcloud.export
  • nextcloud.import
  • nextcloud.manual-install
  • nextcloud.mysql-client
  • nextcloud.mysqldump
  • nextcloud.occ
    nextcloud.apache: simple, enabled, active
    nextcloud.mdns-publisher: simple, enabled, active
    nextcloud.mysql: simple, enabled, active
    nextcloud.nextcloud-cron: simple, enabled, active
    nextcloud.nextcloud-fixer: simple, enabled, active
    nextcloud.php-fpm: simple, enabled, active
    nextcloud.redis-server: simple, enabled, active
    nextcloud.renew-certs: simple, enabled, active
    snap-id: njObIbGQEaVx1H4nyWxchk1i8opy4h54
    tracking: stable
    refresh-date: today at 08:49 PDT
    stable: 16.0.5snap2 2019-10-04 (16402) 228MB -
    candidate: ↑
    beta: ↑
    edge: master-2019-10-15 2019-10-16 (16561) 232MB -
    17/stable: –
    17/candidate: –
    17/beta: –
    17/edge: 16.0.5snap1+git1.d080caa 2019-09-30 (16296) 230MB -
    16/stable: 16.0.5snap2 2019-10-04 (16402) 228MB -
    16/candidate: ↑
    16/beta: ↑
    16/edge: 16-2019-10-15 2019-10-16 (16566) 228MB -
    15/stable: 15.0.11snap2 2019-09-13 (15910) 222MB -
    15/candidate: ↑
    15/beta: 15.0.11snap2 2019-09-30 (16300) 222MB -
    15/edge: 15-2019-10-15 2019-10-16 (16567) 222MB -
    14/stable: 14.0.10snap1 2019-05-04 (13208) 202MB -
    14/candidate: ↑
    14/beta: ↑
    14/edge: ↑
    13/stable: 13.0.12snap1 2019-05-03 (13155) 193MB -
    13/candidate: ↑
    13/beta: ↑
    13/edge: ↑
    12/stable: 12.0.13snap1 2019-01-07 (10632) 206MB -
    12/candidate: ↑
    12/beta: ↑
    12/edge: ↑
    11/stable: 11.0.8snap1 2018-05-10 (6942) 202MB -
    11/candidate: ↑
    11/beta: ↑
    11/edge: ↑
    installed: 16.0.5snap2 (16402) 228MB -

I’m having a what sound like a similar problem having installed nextcloud 16/stable via snap within a ubuntu 18.04 vm
i confess to being a relative linux / snap novice, and don’t do much with either.

I installed configured an admin and test account and lets-encrypt ( all seemed good )
before i started using in anger, I decided i needed a bigger volume so added a second disk , formatted, mounted under /media/nextcloud/, then copied the data and edit the config files.

i tried several times to follow the instructions here https://github.com/nextcloud/nextcloud-snap/wiki/Change-data-directory-to-use-another-disk-partition

i feel i am missing something basic

i have run the removable media command
sudo snap connect nextcloud:removable-media

but still have ended up with non-functioning nextcloud configuration.

I either get :

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log

Or when i try to create an admin account on a new install

Can’t create or write into the data directory /media/nextcloud/data

i have tried changing permissions of the moved data with the following
sudo chown www-data:www-data /media/nextcloud/

I’m sure i have missed something simple

You don’t quite have the same problem. Your data directory must be writable by root. Try sudo chown root:root /media/nextcloud/ instead.

Totally honest here: no clue what this is. This service is running as root and those are definitely things it should be able to access. Could it be umask related?

Despite the errors it looks like I can login via localhost and use the program however the add in options are not complete