Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine if User has Rights to Folder &/or File
Message
De
21/10/2004 00:23:26
Nitin Parulekar
New Zealand Software Corp Ltd
Hamilton, Nouvelle Zélande
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00952884
Message ID:
00953219
Vues:
21
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform