Please change the permissions to 0770 so that the directory

64,719

Solution 1

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.

Solution 2

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/
Share:
64,719

Related videos on Youtube

Loko
Author by

Loko

Updated on September 18, 2022

Comments

  • Loko
    Loko over 1 year

    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.

    • Christopher B. Adkins
      Christopher B. Adkins over 10 years
      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.
    • Loko
      Loko over 10 years
      @FlorianDiesch see my edit
    • Emmanuel
      Emmanuel over 10 years
      To separate fs problem from an owncould problem, how does it work when you put your owncloud data in /var/owncoud (for instance)
    • Loko
      Loko over 10 years
      @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.
    • Emmanuel
      Emmanuel over 10 years
      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
    • Loko
      Loko over 10 years
      @Emmanuel drwxrwxrwx 1 root root 65536 nov 22 10:51 /mnt/usbdrive drwxrwxrwx 1 root root 4096 nov 21 16:43 /mnt/usbdrive/owncloud
    • Sukupa91
      Sukupa91 over 10 years
      have you tried "chmod 0770 /mnt/usbdrive/owncloud/ -R" ??
    • Loko
      Loko over 10 years
      @Sushantp606 I did.
    • Emmanuel
      Emmanuel over 10 years
      sorry I gave answer who was wrong, I deleted. did you remount your usb drive sinc you changed the fstab ?
    • Loko
      Loko over 10 years
      @Emmanuel yes I did
    • Emmanuel
      Emmanuel over 10 years
      I reproduce your problem, see my answer.
    • Loko
      Loko over 10 years
      @Emmanuel I'll try it tomorrow.
  • Loko
    Loko over 10 years
    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
  • Emmanuel
    Emmanuel over 10 years
    @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.
  • kurdtpage
    kurdtpage almost 7 years
    I think that should be "quiet", not "quite"