I am trying to change the permission of a folder in a mounted hard drive.
I didn't use command line to mount (nautilus file manager mounted for me when I clicked on it).
After the drive was mounted, the permission looks like this:
$ ll /run/media/myuser/
drwx------ 1 myuser myuser 4096 Feb 16 09:27 XYZ
Then, I do
$ sudo ln -s /run/media/myuser/XYZ/myData /data
$ chown -R externaluser:externaluser /data
$ ll / | grep data
lrwxrwxrwx 1 externaluser externaluser 44 Mar 2 11:17 data -> /run/media/myuser/XYZ/myData
However, if I run
$ ll /run/media/myuser/XYZ | grep myData
drwx------ 1 myuser myuser 48 Mar 2 12:16 myData
The owner and group are still myuser even after I ran:
chown -R externaluser:externaluser /run/media/myuser/XYZ/myData
How can this be fixed?
Basically, I would like to give access of this folder only to an external user to rsync
data to that folder but I don't want to give access to other folders in the same drive.
Thanks.
This is CentOS 7 if it matters.