Odd attributes of a directory that is also a mount point

Tech-Archive recommends: Fix windows errors by optimizing your registry



I'm seeing odd behavior when taking the attributes of a directory that is
also a mount point:

I mount a volume into an empty directory.

If I take the attributes of that directory (using either API:
GetFileAttributes or GetFileInformationByHandle), I get these attributes:

SYSTEM
HIDDEN
DIRECTORY

The actual directory is not marked as SYSTEM or HIDDEN.

Also, shouldn't REPARSE be set?

So, the question is - how do I get the ACTUAL attributes of a directory that
is a mount point?

The article below describes how to determine if a directory is a mount
point. This article doesn't match what I am seeing.

Thanks for any help,

Bob





Determining Whether a Directory is a Volume Mount Point

It is useful to determine whether a directory is a volume mount point when,
for example, you are using a backup utility or search utility that is
constrained to one volume. Such a utility can reach information on multiple
volumes if you mount all volumes to the one the utility addresses.

To determine if a specified directory is a volume mount point, first call
the GetFileAttributes function and inspect the FILE_ATTRIBUTE_REPARSE_POINT
flag in the return value to see if the directory has an associated reparse
point. If it does, use the FindFirstFile and FindNextFile functions to
obtain the reparse tag. To determine if the reparse point is a volume mount
point (and not some other form of reparse point), test whether the tag value
equals the value IO_REPARSE_TAG_MOUNT_POINT. For more information, see
Reparse Points.

To obtain the target volume of a volume mount point, use the
GetVolumeNameForVolumeMountPoint function.




.



Relevant Pages

  • Re: Odd attributes of a directory that is also a mount point
    ... Instead of GetFileAttributes, I call ... If I use::GetFileAttributeson a mount point, ... > We can invoke GetFileAttributes API to achieve this goal. ... >>Also, shouldn't REPARSE be set? ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Odd attributes of a directory that is also a mount point
    ... Instead of GetFileAttributes, I ... >> We can invoke GetFileAttributes API to achieve this goal. ... >>>I mount a volume into an empty directory. ... >>>Also, shouldn't REPARSE be set? ...
    (microsoft.public.win32.programmer.kernel)
  • RE: Odd attributes of a directory that is also a mount point
    ... We can invoke GetFileAttributes API to achieve this goal. ... Odd attributes of a directory that is also a mount point ... >Also, shouldn't REPARSE be set? ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Odd attributes of a directory that is also a mount point
    ... I checked some internal information about GetFileInformationByHandle API ... Instead of GetFileAttributes, I ... >>>I mount a volume into an empty directory. ... >>>Also, shouldn't REPARSE be set? ...
    (microsoft.public.win32.programmer.kernel)
  • Re: How to mount a volume as a user ?
    ... A mount point is just a kind of "reparse point". ... A user can create a reparse point if he add NTFS rights. ... I wrote a small tool Mountvol like wich can be used as user. ... I know how to put NTFS rights on the root of the volume I mount. ...
    (microsoft.public.windows.file_system)