External drive permissions


#1

Hi,

I'm trying to set up OwnCloud on Raspberry Pi 3 with Raspbian, using external NTFS drive.
Currently stuck with assigning proprer rights to www-data user on external drive.

Getting the familiar error "can't create or write into the data directory", but rights should be set properly. Now it's chmoded to 777 out of despair, but will revert to proper value later if I get it working...

Here's mount dir rights:

pi@rpi3:~ $ ls -alF /media/pi/storage/
total 8
drwxrwxrwx 1 root root 4096 Aug 6 09:43 ./
drwx------ 6 pi root 4096 Aug 6 11:19 ../
drwxrwxrwx 1 www-data www-data 0 Aug 6 10:05 owncloud/
drwxrwxrwx 1 root root 0 Aug 6 09:43 test/
drwxrwxrwx 1 root root 0 Aug 4 14:57 TV/

Subfolders:
pi@rpi3:~ $ ls -alF /media/pi/storage/
total 8
drwxrwxrwx 1 root root 4096 Aug 6 09:43 ./
drwx------ 6 pi root 4096 Aug 6 11:19 ../
drwxrwxrwx 1 www-data www-data 0 Aug 6 10:05 owncloud/
drwxrwxrwx 1 root root 0 Aug 6 09:43 test/
drwxrwxrwx 1 root root 0 Aug 4 14:57 TV/

Nevertheless I still don't have rights for the directory?
pi@rpi3:~ $ sudo -u www-data ls -ail /media/pi/storage/owncloud/
ls: cannot access /media/pi/storage/owncloud/: Permission denied

Mounted drive:

pi@rpi3:~ $ sudo blkid
/dev/loop0: TYPE="squashfs"
/dev/mmcblk0: PTTYPE="dos"
/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="13EB-1138" TYPE="vfat"
/dev/mmcblk0p2: LABEL="berryboot" UUID="fc1ec4e4-e7c5-4eb1-848d-3316778a1a5f" TYPE="ext4"
/dev/sda1: LABEL="storage" UUID="7CDC471ADC46CE58" TYPE="ntfs" PARTUUID="f044002e-01"

Even added www-data user to all users that pi user has, but didn't help...