Droits sur datadirectory

Bonjour,
Tout nouvel utilisateur de Nextcloud, j’ai installĂ© Ubuntu 22.04 puis Nextcloud 28.0.1.1
J’ai un disque dur en 4To que je veux utiliser comme “datadirectory”,
j’ai donc modifiĂ© la variable dans /nextcloud/config/config.php
installĂ© le fichier .ocdata, mais je bloque au niveau des droits d’accĂšs Ă  mon “/mnt/DISQUE”.

Voici ce que ls donne:
drwxrwx--- 1 www-data www-data 4096 janv. 10 13:20 DISQUE
et mon /etc/fstab:
/dev/sdb2 /mnt/DISQUE ntfs defaults,gid=33,uid=33,umask=007 0 1

Avec cette configuration, Nextcloud fonctionne parfaitement mais:
Je voudrait, depuis une seconde machine Ubuntu accéder au dossier //mapremiereip/mnt/DISQUE dans le but de faire des sauvegardes
mais avec ces droits: umask=007 je n’y arrive pas.

Si je chmod mon /mnt/DISQUE en 777 et mon /etc/fstab en:
/dev/sdb2 /mnt/DISQUE ntfs defaults 0 1

J’y accùde depuis l’autre machine, mais Nextcloud n’est plus utilisable, j’ai le message:
Votre dossier “datadirectory” n’a pas les droits “007”

J’ai essayĂ© de monter avec Samba et cifs

Sauriez-vous me donner une solution ?

Hi,
Im a new user of Nextcloud, i install Ubunntu 22.04 and Nextcloud 28.0.1.1
I got a hard drive 4To and i want use as “datadirectory”,
i have modified the var in /nextcloud/config/config.php
i have install the file .ocdata, but im stuck on rights of “/mnt/DISQUE”.

The result of ls:
drwxrwx--- 1 www-data www-data 4096 janv. 10 13:20 DISQUE
and the /etc/fstab:
/dev/sdb2 /mnt/DISQUE ntfs defaults,gid=33,uid=33,umask=007 0 1

With this config, Nextcloud its ok , but:
I would, from an second PC Ubuntu access on folder //mapremiereip/mnt/DISQUE in goal to do copy/save
but with this rights: umask=007 i cant do it.

If i do: chmod /mnt/DISQUE in 777 and my /etc/fstab en:
/dev/sdb2 /mnt/DISQUE ntfs defaults 0 1

I can from the other PC, but Nextcloud is now un usable, i got the error:
You folder “datadirectory” must have rights “007”

I already try to mount with Samba and cifs

Could you help me ?

  1. the data folder “belongs” Nextcloud, it does not expect manual changes, so accessing in parallel through other processes should be avoided. Use the external folder feature instead.
  1. For backup it is ok to access it. I would just use it with a backup process, that for the mounts e.g. windows does not create thumbnails, etc. but perhaps with SMB it can be done.
  1. chmod 777 should not be used at all. It gives access to your data for everybody on your system. It should only be granted to users that should have access. You can adjust the user/group permissions. E.g. you have a backup user www-backup and this user is in the group www-data it will be able to access the data folder.

In an even better world, you can use ACLs on Linux (Access Control Lists - ArchWiki) so that the backup user has only read access.

Thanks for response.
So actually, the /mnt/DISQUE folder is:
drwxrwx--- 1 www-data www-data 4096 janv. 10 13:20 DISQUE
mounted by:
/dev/sdb2 /mnt/DISQUE ntfs defaults,gid=33,uid=33,umask=007 0 1

Ths first PC is on 10.92.1.205, the second computer is on 10.92.1.208,
how can i grant ubuntu user on www-data group to acces accross network ?

i try unsuccessfull:
sudo mount //10.92.1.205/DISQUE /mnt/205_NEXTCLOUD -o username=ubuntu,password=password
sudo mount -t cifs //10.92.1.205/test/ /mnt/205_NEXTCLOUD -o,username=ubuntu,password=password

Or perhaps its impossible, so my question: how can i save the datadirectory of nextcloud accross network between 2 ubuntu PCs ?

Perhaps , its impossible 


 and i have to pass on a “local” backup, like that:

On 10.92.1.205 ,should i copy /mnt/DISQUE to /mnt/DISQUE_SAVE
and after what , on 10.92.1.208
sudo mount //10.92.1.205/DISQUE_SAVE /mnt/205_NEXTCLOUD -o username=ubuntu,password=password

I find a solution for my backup.
I use an id_rsa by ssh and i can rsync accross an ssh

Its perhaps not the best soluce 
 but it works
Thanks hf.