External Drive - You don’t have permission to upload or create files here

Worked. Here is what I did:

OS Version

System - Raspberry Pi 4
OS - Stock Raspbian linux

Install owncloud

Configure OwnCloud for External Storage

  • Edit /var/www/owncloud/config/config/php (well at least thats how its on my rpi now)

  • ‘files_external_allow_create_new_local’ => true,

  • Preparing External Drives (will depend on case by case)

    • I was working on an external NVME drive 1TB
    • Install the exfat utils (had formatted this drive as an exfat filesystem on a mac)
    • sudo apt-get update ; sudo apt-get upgrade
    • Plugged it NVME drive the USB 3.0 port of RPi 4
    • RPi should recognize the drive
  • Run “sudo fdisk -l”

    • Will take a min but you should see two drives
    • /etc/sda1
    • /etc/sda2 (980 Gig available)
    • This might take a few tries though. I had quite a bit of trouble after soft reboots. Needed to physically power-cycle.
  • mkdir a new dir in /media/data

    • run command “sudo mkdir /media/data/nvme1tb-owncloud”
  • Find the ID for www-data

    • run command “sudo id -a www-data”
    • in my case both uid and gid was 33
  • Mount the drive with the right permissions

    • run command -
      “sudo mount -t exfat -o umask=0022,gid33,uid=33 /dev/sda2 /media/data/nvme1tb-owncloud”
  • Also give additional ownership permissions

    • Run command
      “sudo chown -R www-data:www-data /media/data/nvme1tb-drive”
  • Go to owncloud console and add the drive.

    • Enable external drive
    • Should be able to see Local drive in drop down when adding the drive type.
3 Likes