Windows Service running as Local System account cannot access files?

  • Thread starter Joseph N. Stackhouse
  • Start date
J

Joseph N. Stackhouse

I'm making a system utility of sorts that checks files that are installed on
a users system. These files often include access control NTFS permissions
with the Everyone, Deny permission.

I tried making a standard Windows Forms program that ran with UAC as
Administrator to access these files and it fails as well unless I add code
to remove the deny permission before accessing the files, however.. there
has got to be a way to do this and just access the file no matter what
permission it has???

I really thought making my program into a windows service and running it as
Local System would fix this problem, but alas it does not.. anyone have any
ideas? My program scans every file on the system and checks the MD5 sum of
each file, and I have to read files no matter what permissions they have.
Writing code to simply remove the Deny ACL permission from each file then
re-add it later seems sloppy? Any suggestions?

P.S. If you reply also reply via e-mail as I'm not always able to check the
groups. Thanks!

-Joe
 
N

Nobody

Joseph N. Stackhouse said:
I'm making a system utility of sorts that checks files that are installed
on a users system. These files often include access control NTFS
permissions with the Everyone, Deny permission.

Setting Everyone:Deny is not a good idea. Everyone includes SYSTEM, so
SYSTEM is denied as well. This can cause problems with the OS booting. The
recommended solution is to remove "Everyone" group from the permitted list,
and making sure that Administrators and SYSTEM are added.

If you can't control it, you can change the permissions temporarily, then
change it back after you are done.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top