Ubuntu 16.04+nexcloud 11- data folder USB disk?

I would use a usb drive (WD 3TB) for my data directory [folder data].

How to mount this disk with the www-data group? I can not find a clear documentation to use my usb disk by default.

What file system?
If it’s only used for Nextcloud, I would personally choose a Linux file system. It’s better supported and more stable.

If you use NTFS:

1 Like

By following your instructions I now drive usb with www-data

rg@rg-unix:~$ sudo fdisk -l
Périphérique Start Fin Secteurs Size Type
/dev/sdb1 2048 5860464639 5860462592 2,7T Microsoft basic data

rg@rg-unix:/media/rg$ ls -l
drwxrwxr-- 1 www-data www-data 4096 jan 7 09:36 myNextcloudData

I have on my Linux system (Unutu 16.04.1) apache2, mariadb and php
I am getting ready to install nextcloud 11

Can I do nexcloud setup directly through the interface by directly specifying my directory
[data folder : /media/rg/myNexcloudData ]

thanks

I am back. Impossible with Wizard installation use my USB disk.

I have reinstalled Unbutu (16.04.1 LTS), apache2 (2.4.18), mariadb (mysql Ver 15.1 Distrib 10.0.28-MariaDB) and PHP (7.0.13).

In my opinion everything is correct.

Now I install Nextcloud 11. ( /var/xml/nextcloud, user www-data:www-data etc.)
I plug my usb disk , and name with LABEL myNextcloudData (with utility disks)
Search UUID with command blkid (UUID=EAFED6E8FED6ABD7)

I add into file /etc/fstab
UUID=EAFED6E8FED6ABD7 /media/rg/myNextcloudData ntfs rw,auto,users,exec,nls=utf8,umask=002,gid=33,uid=33 0 0

Now I run Wizard and wite
Create and admin account
(user name) : Il write an username
(password) : I write and password

Storage & Database
(database user) : root (for user root of my mysql/mariadb installation
(database password) : password of root

(/var/www/nextcloud) : change for my usb disk => /media/rg/myNextcloudData
(database name) : nextcloud
(localhost) : localhost

No success, Il get message
Error: can’t create or write into the data directory /media/rg/myNextcloudData

I search what is the problem. Do you have solution?

ls -l /media/rg/

I expect to see the data folder owned by user www-data

I have

root@rg-unix:~# ls -l /media
drwxr-x—+ 4 root root 4096 jan 14 23:27 rg

root@rg-unix:~# ls -l /media/rg
drwxrwxr-x 1 www-data www-data 4096 jan 11 17:55 myNextcloudData

Actually /media/rg/myNextcloudData is empty
root@rg-unix:~# ls -l /media/rg/myNextcloudData
total 0

Correct?

I look code (thanks, is open source)
file Setup.php

// validate the data directory
if (
   (!is_dir($dataDir) and !mkdir($dataDir)) or
	is_writable($dataDir)
  ) {
       $error[] = $l->t("Can't create or write into the data directory %s", array($dataDir));
  }
 if(count($error) != 0) {
   return $error;
}

I test with my php code and obtain

((!is_dir [= FALSE]) AND (!mkdir [= TRUE])) OR (!is_writable [= TRUE]) ==> Can’t create or write into the data directory: /media/rg

((!is_dir [= TRUE]) AND (!mkdir [= TRUE])) OR (!is_writable [= TRUE]) ==> Can’t create or write into the data directory: /media/rg/myNextcloudData

Evidently my data directory is not writable.

ls -l
drwxr-x---+   root    root      /media/rg
drwxrwxr-x   www-data www-data  /media/rg/myNextcloudData

Problem is probably witih “rg” (rg is the user)