Welcome to Poppasan Technologies Support Portal 

Ubuntu - Change Permissions

To change the owner of a file (or folder) you use chown (ChangeOwner). You can specify a user and a group as owner. As in,

chown option user:group file/folder

In the situation you a describing, you could try the following, only change the group to www-data, so that the original owner isn't affected.

chown -R :www-data /media/Test/Share

Please notice the : before www-data...

To change the user and group owner of the folder,

chown -R www-data:www-data /media/Test/Share

-R option is used for "Recursive", it will also change the user & group of the folders contents (as in, any other directory or file that it holds).

Also check this other answer, change-folder-permissions-and-ownership

This should do it.

Still, if the user or group don't have sufficient rights yet (read/write) you can use the chmod command for it.

I'll start with the warning...

Please, do not use the value 777 unless you know exactly what you are doing. Even then you should be wondering if it's worth it ;)

Read the following please: Why shouldn't /var/www have chmod 777

For instance, to give current user&group read/write rights on a file, but others none,

chmod 660 filename

 I found this article helpful. (0)