NTFS for Database

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Hello all,

Nextcloud version: 18.0.3 for Server
Operating system and version: Ubuntu 18.04.4 LTS (Bionic Beaver)
Apache or nginx version: Apache/2.4.29
PHP version: PHP 7.2.24

The issue:

I want to use Nextcloud on my Linux server.
Since the database is on an NTFS hard drive, on which my Windows network folder is also located. That’s why I need the NTFS format.

At the first Nextcloud access via my DDNS, the configuration started.

After configuration, Nextcould started with the error for authorization 0770.

I solved the problem as follows in /etc/fstab:

/dev/disk/by-uuid/bf3368fa-8643-46b9-99a0-16ca0ae54e15 / ext4 defaults 0 0
/swap.img       none    swap    sw      0       0
UUID="1476238C76236DA4" /mnt/2TB        ntfs defaults,uid=1000,guid=1000,dmask=007,fmask=007

I also try

UUID="1476238C76236DA4" /mnt/2TB        ntfs defaults,uid=1000,guid=1000,umask=007

UUID="1476238C76236DA4" /mnt/2TB        ntfs-3g uid=1000,guid=1000,umask=007

UUID="1476238C76236DA4" /mnt/2TB        ntfs-3g uid=1000,guid=1000,dmask=007,fmask=007

I also try umask,fmask,dmask = 770, but here the 0770 error 

I always get this error when i try to connect to the webinterface.

Your data directory is invalid. 
Make sure that a ".ocdata" file exists in the root directory of the data directory.
Unable to create the "data" directory This can usually be remedied by giving the web server write access to the root directory. 
See also https://docs.nextcloud.com/server/18/go.php?to=admin-dir_permissions

Is this the first time you’ve seen this error? (Y/N):

The output of your Nextcloud log in Admin > Logging:


The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'oczdhaad85rl',
  'trusted_domains' =>
  array (
    0 => 'XXXXXXXXXXXXXXXXX.ddns.net',
  'datadirectory' => '/mnt/2TB/nextcloud',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'https://XXXXXXXXXXXXXX.ddns.net',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'XXXXXXXXXXXXXX',
  'installed' => true,

The output of your /nginx/systemApache log in /var/log/apache2/error.log:

[Mon Apr 06 11:02:29.712578 2020] [mpm_prefork:notice] [pid 1230] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 conf$
[Mon Apr 06 11:02:29.712647 2020] [core:notice] [pid 1230] AH00094: Command line: '/usr/sbin/apache2'

The output of your /nginx/systemApache log in /var/log/apache2/access.log:

XX.XX.XX.XXX - - [06/Apr/2020:11:06:47 +0000] "GET / HTTP/1.1" 503 4984 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; $
XX.XX.XX.XXX - - [06/Apr/2020:11:06:48 +0000] "GET /favicon.ico HTTP/1.1" 503 4984 "-" "Mozilla/5.0 (Windows NT 10$

The output of your /nginx/systemApache log in /var/log/apache2/other_vhosts_access.log:


Many thanks in advance


PS: Sorry about the strange english, I’m wood german

I think you can not use NTFS for the data directory. Format it to EXT4 or BTRFS.
Use NTFS for external drive. Nextcloud is a (free) software for free operating systems and free formats and not NTFS. NTFS can not used as primary data-dir.


It is also not a “database”. The database is “MariaDB”.

The installation of Nextcloud is also on the SSD EXT4.

The folders that nextcloud should access are on the NTFS

this folder has to read/writeable by the apache user. most likely www-data.

sudo chown -R www-data:www-data /mnt/2TB/nextcloud
sudo chmod 0700 /mnt/2TB/nextcloud

user www-data, group www-data with NTFS?

Don’t work for me. Same result

@devnull what you mean?

as @devnull already has hinted to… NTFS and linux persmissions don’t go very well together. afaik.

1 Like

which format can linux and dos use together?

Perhaps it works. Read.
It is german. Read only the code. Nobody needs documentation :wink:

Please backup your NTFS-drive.

I have found my Error.

UUID="1476238C76236DA4" /mnt/2TB ntfs defaults,uid=1000,guid=1000,dmask=007,fmask=007

uid and guid should be 33 for www-data

UUID="1476238C76236DA4" /mnt/2TB ntfs defaults,uid=33,guid=33,dmask=007,fmask=007

closed and thx

1 Like