Can't create or write into the data directory /var/www/owncloud/data

,

Steps to reproduce

  1. Carefully followed guide: Detailed Installation Guide
  2. Then run Scripts for the Script-Guided Installation
  3. Try to finalise the installation using installation wizard or command line with occ

Expected behaviour

Expect to finialise setup and then be able to use ownCloud

Actual behaviour

Installation wizard in browser and occ in terminal both fail with:

Can’t create or write into the data directory /var/www/owncloud/data
Can’t create or write into the apps-external directory /var/www/owncloud/apps-external

Server configuration

Operating system:
Ubuntu 24.04

Web server:
Apache 2

Database:
MariaDB/MySql

PHP version:
7.4

ownCloud version: (see ownCloud admin page)
10.15

Updated from an older ownCloud or fresh install:
Fresh install

Where did you install ownCloud from:
Official sources as outlined in installation guide on website.

I have checked folder permissions and I have:

root@linux-build-server:/var/www# stat owncloud
File: owncloud
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 8,2 Inode: 9961721 Links: 12
Access: (0750/drwxr-x—) Uid: ( 33/www-data) Gid: ( 33/www-data)
Access: 2025-01-07 16:59:41.001114541 +0000
Modify: 2025-01-07 16:40:13.321796834 +0000
Change: 2025-01-07 16:56:59.768559947 +0000
Birth: 2025-01-07 16:39:59.136831445 +0000

root@linux-build-server:/var/www/owncloud# stat apps-external
File: apps-external → /home/duncan/owncloud_data/apps-external
Size: 40 Blocks: 0 IO Block: 4096 symbolic link
Device: 8,2 Inode: 9992524 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 33/www-data) Gid: ( 33/www-data)
Access: 2025-01-07 16:57:34.864696090 +0000
Modify: 2025-01-07 16:40:13.321796834 +0000
Change: 2025-01-07 16:56:59.757559903 +0000
Birth: 2025-01-07 16:40:13.321796834 +0000

root@linux-build-server:/var/www/owncloud# stat data
File: data → /home/duncan/owncloud_data/data
Size: 31 Blocks: 0 IO Block: 4096 symbolic link
Device: 8,2 Inode: 9992523 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 33/www-data) Gid: ( 33/www-data)
Access: 2025-01-07 16:57:34.856696060 +0000
Modify: 2025-01-07 16:40:13.319796838 +0000
Change: 2025-01-07 16:56:59.757559903 +0000
Birth: 2025-01-07 16:40:13.319796838 +0000

root@linux-build-server:/var/www/owncloud# stat /home/duncan/owncloud_data/data
File: /home/duncan/owncloud_data/data
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 8,2 Inode: 8029241 Links: 2
Access: (0777/drwxrwxrwx) Uid: ( 33/www-data) Gid: ( 33/www-data)
Access: 2025-01-07 16:40:13.963795274 +0000
Modify: 2025-01-07 17:21:57.356977682 +0000
Change: 2025-01-07 17:21:57.356977682 +0000
Birth: 2025-01-07 16:40:13.318796841 +0000

root@linux-build-server:/var/www/owncloud# stat /home/duncan/owncloud_data/apps-external/
File: /home/duncan/owncloud_data/apps-external/
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 8,2 Inode: 8029242 Links: 2
Access: (0777/drwxrwxrwx) Uid: ( 33/www-data) Gid: ( 33/www-data)
Access: 2025-01-07 16:40:13.962795277 +0000
Modify: 2025-01-07 16:40:13.320796836 +0000
Change: 2025-01-07 17:20:43.732461127 +0000
Birth: 2025-01-07 16:40:13.320796836 +0000

I think the permissions and ownership look ok. I’ve seen a few othe jrposts with similar issues but the solution in my case is unclear. Please can someone advise.

My recommendation: Do your path setup in config.php rather than by linking.

Thanks for the reply.

With this current issue I can’t get it to finish the installation finalisation step to then have a filled out config.php to then add to it. When I look at the config.php at this stage it is pretty much empty. Do I need to skip this step and manually create a config.php?

I was just following the documentation and this is my first attempt to fully setup ownCloud as a native installation as opposed to in docker.

I had got a docker version mostly working but I was stuck with that setup not being able to get 2FA to activate or work.