You are probably not doing anything wrong. It seems to me that the real issue is that the instructioninstructions, as written, don't work generically. The point at which you are apparently stuck is the chown
command, but all that is intended to accomplish is to make sure that "you" (really the pi
user) actually owns the folder to be shared.
If you created the /home/pi/HDD
directory while logged in as the pi
user, and before mounting the external drive, that's already done, so you can simply skip that step. As already mentioned in the answer you got, the FAT file system doesn't support such permissions, so they can't be applied after the drive is mounted.
If you're going to add this mount to your /etc/fstab
file and still want it mounted by the pi
user, then you'll need to specify the uid
and gid
on the line. For example:
/dev/sda2 /home/pi/HDD ntfs-3g defaults,user,uid=1000,gid=1000,noatime 0 0
Note that this assumes that the pi
user is user 1000. (Check that by issuing the id
command when logged in as pi
.)