Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine if User has Rights to Folder &/or File
Message
From
21/10/2004 00:23:26
Nitin Parulekar
New Zealand Software Corp Ltd
Hamilton, New Zealand
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00952884
Message ID:
00953219
Views:
20
Thanks Anatoliy,

It seems like when a file has user restrictions, it does not return the owner of the file. Does this mean that the current user is not allowed to access the file?

We are actually checking if a file (dlls/ocx, etc) exists in the local machine. Our program should be able to detect if a certain file 'physically' exist regardless whether it is hidden, readonly or has restrictions. Apparently, on certain scenarios (for instance file has user restrictions) getfileattr and/or VFP's file() function returns different results (usually file not exist) even though the file really exists on the user's local machine. Where there is are no user rights to a certain file and it exists in the local machine, we display a message to contact sys admin.

We are having a play of the functions (getfilesecurity) in the code you gave. However do you have the values/constants of DACL_SECURITY_INFORMATION, GROUP_SECURITY_INFORMATION etc. Or is there a direct way to determine if the user has rights to a folder and/or file?

Thanks in advance.

Regards,
Nitin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform