Error: Your data directory is readable by other users | Data change to external

i have the same problem, i installed with snap then i changed the location from data to my own location and then the same message as described above "Please change the permissions to 0770 so that the directory can be listed by other users.

my question which owner i have to give because www-data will not be, because of snap installation and root does not work as described above.


welcome to the forum and thank you for your very first contribution here.

though I doubt that you have the “same problem” - as the other thread was over 2 years old.
So why not opening a new thread (as I did here for you) and giving out some relevant info.

Plus: there might be more threads with possible solutions here on the forum…

thank you for open a new thread :slightly_smiling_face:

so I have installed nextcloud via snap, made my data location to /media/usbhd/(data) , made the changes

sudo nano /etc/fstab

/dev/sda1 /media/usbhd ntfs defaults 0 1

sudo chown -R root:root /media/usbhd
sudo chmod -R 0770 /media/usbhd

but still I get the message :

"Your data directory is readable by other users
Please change the permissions to 0770 so that the directory cannot be listed by other users."

apparently nobody else has the problem as I have seen, at least not about snap installation

Normally the data folder is owned by www-data. I don’t know if/why this would be different in a snap installation. Try using the same owner as the snap installation’s web root.

I’ve already tried that

You have it owned by root above. What user owns you web root and config folders?

the config.php is in /var/snap/nextcloud/current/nextcloud/config/config.php

every snap installation has its own services such as:

$ snap services
Service                    Startup  Current   Notes
nextcloud.apache           enabled  active    -
nextcloud.mdns-publisher   enabled  active    -
nextcloud.mysql            enabled  active    -
nextcloud.nextcloud-cron   enabled  active    -
nextcloud.nextcloud-fixer  enabled  inactive  -
nextcloud.php-fpm          enabled  active    -
nextcloud.redis-server     enabled  active    -
nextcloud.renew-certs      enabled  active    -

Right, I know about the services. I only used the snap installation briefly myself. When I found out I would have to move heaven and earth to add smbclient, I switched to Docker.

So to my question, what user owns the web root and config folders in your installation?

how can I query that?

or maybe I should try a docker installation?
is this possible with external ?

You would have to go to the location of the snap installation and check. I don’t remember exactly where it is.

If you’re interested in trying a Docker setup, I wrote a guide for it. You can use external storage with it too. Just change the data folder location in your docker-compose file.

1 Like

the location of the snap installation should be here

i have now done a new installation and i think the problem was that i have enabled external storage with the same location that was chrashing and not necessary but i think it should work now

but i’ll have a look in the manual and try it out thanks for the help

Did anyone find the solution? I just found this server/config.sample.php at c364b0cb193f66ad15e2950c27113b40037d1bf6 · nextcloud/server · GitHub

But I’m not sure if it would be the proper way to deal with this error. Ideas?

1 Like

I can confirm, it works, but still not sure if it is the right approach