1

I want to install owncloud on my Raspberry-pi (Model B), I've got it running but only on my SD-card. Now i want to set the data on my External HDD.

I've added the follow line in /etc/fstab, so the HDD will be mounted on boot.

/dev/sda1 /media/New/ ntfs-3g rw,gid=500,umask=0007,defauts 0 0

Umask is setting the permission to 0770, this is necessary by owncloud. But the data directory (in my case /media/New/Cl/data) must be 0777. Is there a way to set the permissions of every folder to 0770 except the data directory? (0777)

I'm using my hard disk for other data to, so formatting the disk to an other format isn't really possible.

I'm new to Linux, so any help is welcome!

2 Answers 2

1

I attempted to setup an owncloud as well with my Raspberry Pi 2.

On the first time many errors occurred, although I managed to get the owncloud running on an external 500GB NTFS drive (it also worked well on my Fat32 partition).

Sometimes there was an error with the permissions on the external drive which needed chmod and chown to fix. For example: if I didn't set the ownership properly with:

sudo chown -R username:groupname /mnt/usbstorage/owncloud`

[Editor note: putting in the right things for username:groupname, it wasn't specified pre-edit, possibly pi:users]
it didn't work at all...

Just in case you are still willing to try this again or for future reference.

Try to add this information to your etc/fstab with say sudo nano /etc/fstab:

UUID=4234A32424A234EE /mnt/usbstorage ntfs  defaults,nls=utf8,uid=1000,gid=1000,dmask=007,windows_names 0 0

You may need nfts-3g instead of ntfs.

Then afterwards reboot with sudo reboot. Tada! The error 0770 should be gone. Hope it helps!

2
  • 1
    You will need to have the correct UUID for the drive/filesystem you wish to mount - you can usually get this from the output of the blkid utility (run as root or with sudo). The mount point should already exist (as an, ideally empty, directory), which in this case is /mnt/usbstorage.
    – SlySven
    Jan 10, 2016 at 2:19
  • Thanks for edit and clarity @SlySven . I'm quite new here so still a lot to learn :)
    – Alireza7am
    Jan 11, 2016 at 19:44
0

Apparently this question is hard to answer, so I've bought a USB flash drive for testing. It worked immediately after formatting to ext4.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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