I did everything according to these instructions on the OwnCloud forum but I get the error:

Data directory (/mnt/usbdrive/owncloud/) is readable for other users
Please change the permissions to 0770 so that the directory cannot be listed by other users.

I gave the permissions like:

 chmod 0770 /mnt/usbdrive/owncloud/

and I changed my /etc/fstab

I used:

chown -R www-data:www-data /mnt/usbdrive/owncloud/

as well. But I still get that error when going to owncloud

This is what my /etc/fstab looks like:

[screenshot of fstab in terminal

EDIT: This error only comes up when I change the data directory. If I keep it the same, I can acces it normally.

  • If /mnt/usbdrive/owncloud/ is on a filesystem like FAT or NTFS that doesn't support Unix-style permissions chmod and chown don't work and you have to set the permissions using mount options. Please add the content of your /etc/fstab to your question. – Florian Diesch Nov 22 '13 at 13:48
  • @FlorianDiesch see my edit – Loko Nov 22 '13 at 14:25
  • To separate fs problem from an owncould problem, how does it work when you put your owncloud data in /var/owncoud (for instance) – Emmanuel Nov 28 '13 at 16:18
  • @Emmanuel You mean the standard data directory? It gives me a log in screen. When I use the hdd directory, it gives me that error. – Loko Nov 28 '13 at 16:33
  • Maybe your chown/chmod is not working or it check also that the parent directory is not too permissive, what shows the command ls -ld /mnt/usbdrive/owncloud /mnt/usbdrive – Emmanuel Nov 28 '13 at 16:40

With the inputs you provided, you have to change your mount options in /etc/fstab.


Don't use the umask option; it seems that the mount.ntfs-3g manpage is false where it claims that mask will apply to newer files. All the ".mask" options apply also to already existing files.

With umask=0 all your files get rwxrwxrwx rights.

| improve this answer | |
  • Okay now you know what, I have no idea if this fixed it. I did 2 things before rebooting my raspberry. Your fix and chmod a+r /mnt/usbdrive/. Vote up anyway – Loko Nov 29 '13 at 14:35
  • @Loko I was wrong when I tested I made a sysntax error to the permissions option. Your problem was the umask=0 populating rights to all you file. I rewrote my answer. Now all is working. – Emmanuel Nov 29 '13 at 15:13

I assume you're new to using Linux commands. In Linux, there is a SuperUser named Root which by default is locked (you can unlock it though). But you can still run programs with root-level privileges. This is where sudo comes in - it allows authorized users to run certain programs as Root. And you'll find yourself using sudo very often while performing the administrative tasks.

Changing file mode bits and ownership in /mnt directory will require root privileges. So if you haven't already done this, run the commands with sudo as:

sudo chmod 0770 /mnt/usbdrive/owncloud/
sudo chown www-data:www-data /mnt/usbdrive/owncloud/
| improve this answer | |
  1. First find the uid (user id) and gid (group id) for your mount (do a grep in /etc/passwd and /etc/group).
  2. Then add an entry in /etc/fstab


/dev/sda1 /mnt/usbdrive ntfs-3g  quiet,locale=en_US.utf8,uid=1001,gid=33,dmode=770,fmode=660,comment=systemd.automount 0 0

EDIT: quite to quiet

| improve this answer | |
  • I think that should be "quiet", not "quite" – kurdtpage Jun 3 '17 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.