ownCloud permissions


#1

After manually updating my ownCloud instance from 9.1.8 to 10.0.8, it all works perfectly well but permissions have changed. At some point I have changed permissions with

sudo chown -R www-data:www-data /var/www/owncloud

And now I have this...

/var/www/owncloud$ ls -lah
total 244K
drwxr-xr-x 12 www-data www-data 4.0K May 7 10:47 .
drwxr-xr-x 5 root root 4.0K May 6 10:50 ..
drwxrwxrwx 26 www-data www-data 4.0K May 7 11:17 apps
-rw-r--r-- 1 www-data www-data 8.7K Apr 19 18:15 AUTHORS
-rw-r--r-- 1 www-data www-data 59K Apr 19 18:15 CHANGELOG.md
drwxrwxrwx 2 www-data www-data 4.0K May 6 10:52 config
-rw-r--r-- 1 www-data www-data 4.3K Apr 19 18:15 console.php
-rw-r--r-- 1 www-data www-data 34K Apr 19 18:15 COPYING
drwxr-xr-x 17 www-data www-data 4.0K Apr 19 18:18 core
-rw-r--r-- 1 www-data www-data 4.9K Apr 19 18:15 cron.php
-rw-r--r-- 1 www-data www-data 31K Apr 19 18:15 db_structure.xml
-rw-r--r-- 1 www-data www-data 3.0K May 6 11:10 .htaccess
-rw-r--r-- 1 www-data www-data 179 Apr 19 18:15 index.html
-rw-r--r-- 1 www-data www-data 3.7K Apr 19 18:15 index.php
drwxr-xr-x 3 www-data www-data 4.0K Apr 19 18:15 l10n
drwxr-xr-x 6 www-data www-data 4.0K Apr 19 18:15 lib
-rwxr-xr-x 1 www-data www-data 283 Apr 19 18:15 occ
drwxr-xr-x 2 www-data www-data 4.0K Apr 19 18:15 ocs
drwxr-xr-x 2 www-data www-data 4.0K Apr 19 18:15 ocs-provider
-rw-r--r-- 1 www-data www-data 3.2K Apr 19 18:15 public.php
-rw-r--r-- 1 www-data www-data 5.4K Apr 19 18:15 remote.php
drwxr-xr-x 4 www-data www-data 4.0K Apr 19 18:15 resources
drwxr-xr-x 12 www-data www-data 4.0K Apr 19 18:15 settings
-rw-r--r-- 1 www-data www-data 2.0K Apr 19 18:15 status.php
drwxr-xr-x 6 www-data www-data 4.0K May 7 10:47 updater
-rw-r--r-- 1 www-data www-data 163 Apr 19 18:15 .user.ini
-rw-r--r-- 1 www-data www-data 271 Apr 19 18:17 version.php

Instead of this (what I had with the previous owncloud version)...

/var/www/owncloud-old$ ls -lah
total 216K
drwxr-xr-x 17 root root 4.0K Apr 2 15:47 .
drwxr-xr-x 5 root root 4.0K May 6 10:50 ..
drwxr-xr-x 29 root root 4.0K Mar 14 11:14 3rdparty
drwxr-xr-x 28 www-data www-data 4.0K Dec 22 18:35 apps
drwxr-xr-x 2 www-data www-data 4.0K Nov 22 15:32 assets
-rw-r--r-- 1 root root 8.2K Mar 12 10:56 AUTHORS
drwxrwxr-x 2 www-data www-data 4.0K Apr 5 19:06 config
-rw-r--r-- 1 root root 4.1K Mar 12 10:56 console.php
-rw-r--r-- 1 root root 34K Mar 12 10:56 COPYING-AGPL
drwxr-xr-x 17 root root 4.0K Mar 14 11:14 core
-rw-r--r-- 1 root root 4.9K Mar 12 10:56 cron.php
drwxr-xr-x 2 www-data www-data 4.0K Mar 12 15:00 data
-rw-r--r-- 1 root root 35K Mar 12 10:56 db_structure.xml
drwxr-xr-x 2 root root 4.0K Nov 22 15:32 etc
-rw-rw-r-- 1 www-data www-data 2.6K Mar 16 11:23 .htaccess
-rw-r--r-- 1 root root 1.0K Mar 23 15:33 ..htaccess.swp
-rw-r--r-- 1 root root 179 Mar 12 10:56 index.html
-rw-r--r-- 1 root root 3.0K Mar 12 10:56 index.php
drwxr-xr-x 3 root root 4.0K Mar 14 11:14 l10n
drwxr-xr-x 6 root root 4.0K Mar 14 11:14 lib
-rwxr-xr-x 1 root root 283 Mar 12 10:56 occ
drwxr-xr-x 2 root root 4.0K Mar 14 11:14 ocs
drwxr-xr-x 2 root root 4.0K Mar 14 11:14 ocs-provider
-rw-r--r-- 1 root root 3.1K Mar 12 10:56 public.php
-rw-r--r-- 1 root root 5.4K Mar 12 10:56 remote.php
drwxr-xr-x 4 root root 4.0K Dec 22 18:35 resources
-rw-r--r-- 1 root root 26 Mar 12 10:56 robots.txt
drwxr-xr-x 11 root root 4.0K Mar 14 11:14 settings
-rw-r--r-- 1 root root 1.9K Mar 12 10:56 status.php
drwxr-xr-x 3 www-data www-data 4.0K Mar 14 11:14 themes
drwxr-xr-x 7 root root 4.0K Apr 2 21:39 updater
-rw-rw-r-- 1 www-data www-data 163 Mar 12 15:00 .user.ini
-rw-r--r-- 1 root root 250 Mar 12 10:57 version.php

What is correct?


#2

See here:
https://doc.owncloud.org/server/latest/admin_manual/installation/installation_wizard.html#post-installation-steps-label


#3

https://doc.owncloud.com/server/10.0/admin_manual/installation/installation_wizard.html#post-installation-steps

If I look on this script, 0644 should be right


#4

I think as long as the web server can read the files it should be fine. The only exceptions are the "data" and "config" directories because the web server will need to write there.