1

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

2
  • Could you add a mini directory tree and explain which user will have access to each folder? Are you wanting to set this on boot? If you set it once it should keep it.
    – xR34P3Rx
    Commented Sep 8, 2017 at 10:24
  • the current command that you are executing will give www-data read-write-exec both for owner and group and for other it gives read if you run 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 the chmod 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.
    – xR34P3Rx
    Commented Sep 8, 2017 at 10:33

1 Answer 1

4

While NTFS supports permissions, the mapping from Windows-style to POSIX-style is troublesome and disabled by default in ntfs-3g.

To activate it you should:

  • If the disk is shared with Windows – create a UserMapping file which maps Windows SIDs to Linux UIDs, by default ntfs-3g will look for it at:

    /media/USBHDD1/.NTFS-3G/UserMapping
    

    ntfs-3g.usermap can semi-automatically generate the list.

  • Otherwise you can just add the permissions mount option, or manually pick any SID prefix.

http://www.tuxera.com/community/ntfs-3g-manual/#6

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .