UnauthorizedAccessException

G

groups.james

I have a simple console application that moves some log files from one
server to another, then compresses the files for archival reasons.
..NET 1.1, C#

All was fine, no problems. We upgraded the server that has the log
files. I added the correct permissions to the share on the new server.


My process is now throwing a UnauthorizedAccessException on the
File.Move command, saying that it cannot copy the file to the
destination folder. It can access the new server but now it cannot
write to the destination folder...the destination folder has not
changed, is a local directory on the server the process is running on.
The process is running under an account that has full access to the
destination folder. I have also run the process as Administrator and I
still get this error.

Any suggestions? I have no idea why this process cannot write to a
directory that it has full access to.

thanks

James
 
G

groups.james

Nevermind.

I forgot to apply the new security settings to a couple of the log
files prior to changing the security of the log file folder itself. I
had moved those files manually temporarily, then moved them back into
their normal location for the process to pick them up...they didn't
pick up the new security settings (as is expected...but easily
overlooked)...now that I applied the correct permissions at the file
level everything is working again...any new log files created should be
fine.

James
 

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