Autor Beitrag
pewo1106
Hält's aus hier
Beiträge: 4



BeitragVerfasst: Di 20.05.03 16:47 
Hallo

Möchte mit meinem Prog auf Dateien zugreifen, die einen anderen NT-User als Besitzer haben. Nur dieser hat lese und schreib Rechte.
Wie kann ich jetzt den Besitzer und die Zugriffsrechte dieser Dateien über Delphi ändern. Ich habe im Windows Administratorenrechte habe.

Gruß Peter
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Di 20.05.03 21:47 
sofern du über deinen Admin-Account auf die Datei zugreifst, sollte es keine Probleme geben. Warum also willst du die Dateibesitzrechte übernehmen? Ich hab da mal ne Kompo gesehen, google mal nach ACL.

grez
msch
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Mi 21.05.03 08:09 
Sofern man das SeTakeOwnershipPrivilege hat (als Admin hat man es immer) kann man sich als Besitzer einer Datei eintragen und bekommt so alle Zugriffsrechte. Generell ist das Thema sehr komplex, aber du kannst dir ja mal die entsprechenden APIs anschaun:
LookpuAccountName - damit kannst du dir die SID für den neuen Besitzer holen
SetSecurityInfo - damit setzt du den neuen Besitzer der Datei

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
pewo1106 Threadstarter
Hält's aus hier
Beiträge: 4



BeitragVerfasst: Do 22.05.03 21:38 
Hallo

Die Tips sind gut, doch leider finde ich zu diesen Stichwörtern keine Beispiele oder Hilfen.

Gruß Peter :lol:
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Fr 23.05.03 07:53 
Schon mal im MSDN geschaut? :roll:

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!