What the message looks like
Your data directory is readable by other users. Please change the permissions to 0770 so that the directory cannot be listed by other users.Common causes
- The data directory has 0755 or 0775 instead of 0770, e.g. after a restore or
cp -r. - A new data directory was created as root and opened with
chmod 755only. - A CIFS/SMB or NFS mount presents fixed permissions that
chmodcannot change. - Docker volume with wrong UID/GID or permissions from the host.
Check
- Read the data directory path from the config
sudo -u www-data php /var/www/nextcloud/occ config:system:get datadirectory - Show permissions and owner
stat -c '%a %U:%G %n' /var/www/nextcloud/data - Check filesystem and mount options
findmnt -T /var/www/nextcloud/data -o TARGET,FSTYPE,OPTIONS
Fix
- Set permissions:
chmod 0770 /var/www/nextcloud/dataand ownerwww-data:www-data. - For CIFS mounts set permissions via mount options:
uid=www-data,gid=www-data,file_mode=0770,dir_mode=0770. - For NFS set permissions on the server, not the client.
- Only if the filesystem cannot do Unix permissions:
'check_data_directory_permissions' => falsein config.php – knowing the check is then gone. - Always check owner and permissions after restores.
FAQ
Is it enough to change only the top directory?
For the warning, yes – the check looks at the data directory itself. Files below should still belong to the web server user.
Why 0770 and not 0750?
Both work. Nextcloud only requires that “others” have no access. 0750 is stricter if the group does not need to write.