Maybe I can flesh this out a bit. When you create a partition, what you are doing is putting up two walls that encloses a given block of memory. At this point there is no ownership or permissions associated with the partition.
You then format this new partition with a file system. There is still no ownership or permissions associated with this partition. There are no files or folders on the partition. In ext3/4, only files and folders can have ownership or permissions.
A mount point has to be created in the file system to use the partition. If we create this mount point as a user, say in your /home, with "mkdir /home/fred
/Data" that folder will be owned by the user and have the default user permissions. If you then mount the formatted partition you created to this folder with an appropriate fstab entry, you will then have user access, read/write, through that mount point. Any files and folders created through that mount point will inherent the user's ownership and permissions. Life is good!
Now, here is where the complications come into play. If you mount the partition in a different place in the file system or in another system the ownership of any files or folders created through the original mount point will not be changed just because you decided to mount it somewhere else. The permissions of the existing files/folders will have to be adjusted to accommodate the new user accessing from a different mount point, to have full access to existing files/folders.
Lets say you have a data partition mounted in two different /homes. One user is fred
and the other is bill. There is nothing on the partition. fred
owns one mount point with 0644 permissions. bill owns the other mount point with 0644 permissions. Each user can create and use files and folders through their mount point. But will only have read access to the others files/folders.
Once you have played with a partition, mounted and tried to use it, and/or tried to change ownership/permissions through several mount points, that has existing files and folders on it, you probably have a mess
. It is best to just start from scratch and set the ownership and permissions to known values. This usually solves the problem.
The link below may also be helpful in understanding Linux file/folder ownership and permissions better.viewtopic.php?f=55&t=27279&p=158834&hilit=fred+numerical#p158834
The link below may help you with auto mounting partitions.viewtopic.php?f=42&t=22093Fred