I mount an external drive on my Raspberry-Pi (Debian/stretch) and I mount my external drive in the fstab
like this:
UUID=1AD09862DC893951 /media/USBHDD1 ntfs-3g nofail,uid=pi,gid=pi,umask=007 0 0
Once the disk is mounted, I want to provide ownership (chown
) for different folders in it to different users.
Currently sudo chowm -R www-data:www-data /media/USBHDD1/Pi/Data
does not have any impact.
Is this possible? If so what changes do I need to do?
UPDATE:
What I am trying to do? I'm installing OwnCloud and wanted to keep OwnCloud data on this drive. This drive is also mounted as a Samba share. Now, for OwnCloud, I needed access (Ownership/Read-Write) on a folder on the Drive. OwnCloud writes to it as www-data
ls -l | grep Data
(run on parent of Data folder) you can see for yourself. If this is not what you want you need to look into thechmod
command and you can modify the permissions for owner/group and other. With that you can grant/deny complete access to a folder for users.