Bug 239249 - www/nextcloud pkg installs with wrong permissions
Summary: www/nextcloud pkg installs with wrong permissions
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bernard Spil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-16 12:56 UTC by tech-lists
Modified: 2019-07-16 12:56 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (brnrd)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tech-lists 2019-07-16 12:56:30 UTC
Hello,

If nextcloud is installed from the pkg repo, it installs into /usr/local/www/nextcloud. The ownership of files in this directory as installed is wrong. Some files are root:www. In order for nextcloud to function correctly, owner needs to be set to www.

here is ownership when pkg installs it:

 # ls -lah nextcloud/
total 168
drwxr-xr-x  16 www   www     1.5K Jul 16 13:38 .
drwxr-xr-x   6 root  wheel   512B Jul 16 13:35 ..
-rw-r--r--   1 root  www     2.3K Jul  4 08:17 .htaccess
-rw-rw-r--   1 www   www     101B Jul  4 08:17 .user.ini
drwxr-xr-x  32 www   www     1.0K Jul 16 13:38 3rdparty
-rw-r--r--   1 root  wheel    12K Jul  4 08:17 AUTHORS
-rw-r--r--   1 root  wheel    34K Jul  4 08:17 COPYING
drwxr-xr-x   2 www   www     512B Jul 14 02:28 apps
drwxr-xr-x  42 root  wheel   1.0K Jul  4 08:18 apps-pkg
drwxr-xr-x   2 www   www     512B Jul 16 13:38 config
-rw-r--r--   1 root  wheel   3.7K Jul  4 08:17 console.php
drwxr-xr-x  23 www   www     1.0K Jul 16 13:38 core
-rw-r--r--   1 root  wheel   4.9K Jul  4 08:17 cron.php
drwxr-xr-x   2 www   www     512B Jul 14 02:28 data
-rw-r--r--   1 root  wheel   156B Jul  4 08:17 index.html
-rw-r--r--   1 root  wheel   3.1K Jul  4 08:17 index.php
drwxr-xr-x   6 www   www     512B Jul 16 13:38 lib
-rw-r--r--   1 root  wheel   283B Jul  4 08:17 occ
drwxr-xr-x   2 www   www     512B Jul 16 13:38 ocm-provider
drwxr-xr-x   2 www   www     512B Jul 16 13:38 ocs
drwxr-xr-x   2 www   www     512B Jul 16 13:38 ocs-provider
-rw-r--r--   1 root  wheel   2.9K Jul  4 08:17 public.php
-rw-r--r--   1 root  wheel   5.0K Jul  4 08:17 remote.php
drwxr-xr-x   4 www   www     512B Jul 16 13:38 resources
-rw-r--r--   1 root  wheel    26B Jul  4 08:17 robots.txt
drwxr-xr-x  12 www   www     512B Jul 16 13:38 settings
-rw-r--r--   1 root  wheel   2.2K Jul  4 08:17 status.php
drwxr-xr-x   3 www   www     512B Jul 16 13:38 themes
drwxr-xr-x   2 www   www     512B Jul 16 13:38 updater
-rw-r--r--   1 root  wheel   362B Jul  4 08:21 version.php

One has to chown -R www:www /usr/local/www/nextcloud in order to get it working properly. Nextcloud has the requirement of the occ command having to be run as user www or it will error.