Link to home
Start Free TrialLog in
Avatar of notable
notable

asked on

Changing security settings of a file via a scheduled task or service

We have a programme running on Windows 2003 Server as a service.  It creates a log file, and everytime it writes to the log file it changes the security settings so only Administrator has rights to view the file.  Even if I manually reset the security settings on the file, when it next writes back to it, it resets the security back to Admin only.

I would like to run some sort of a programme that is scheduled to run a few minutes afterwards, that resets the security on the log file so that standard users can view the log file.

Does anyone know of any software that can do this??  

ASKER CERTIFIED SOLUTION
Avatar of JamesDS
JamesDS

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of notable
notable

ASKER

CACLS does change the user rights correctly, but requires a user input (Y/N) when running.  I need to be able to schedule this to be run without user input.

Normally I just add a "<y.txt" at the end of the command line, and create a y.txt file with Y in it to automatically respond Y to this sort of question.  Doesn't seem to work in this instance.

XCACLS.EXE is not part of the 2003 resource kit.   Any other ideas where to find it, as it may not require the input that CACLS does.

Thanks.
notable

doh!

XCACLS.EXE is part of the Windows 2003 support tools on the CD

Sorry for the confusion

Cheers

JamesDS

Avatar of notable

ASKER

Thanks.  XCACLS works great - it has an option for the /Y switch to force an answer of Yes.

Regards,
Russell.
notable
Welcome, glad it works for you

Cheers

JamesDS