3

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.

Zanna
  • 72,312
Loko
  • 131

3 Answers3

4

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

quiet,defaults,permissions,locale=en_US.utf8

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.

darxtrix
  • 123
Emmanuel
  • 1,333
1

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/
rusty
  • 16,917
0
  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

/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