Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Two days ago, I completed a standard Windows 8 installation. It was a fresh install. However, Windows 7 was on the disk before, and the installer migrated it to Windows.old.

For some strange and weird reason, I am struggling to "write" to my disk in regards to .NET applications. It appears that none of my .NET (self-written) applications can write to their log files on disk, which are created on startup.

I have disabled UAC, as well as set Full Control over Disk C: for my user, but had no luck. I keep getting the error:

A required privilege is not held by the client.

I did Google and try some online tutorials, but still had no luck!

share|improve this question
    
Disabling UAC completely in Windows 8 is not as it was in Windows 7, you need to change a DWORD in the registry as well. It's in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System, EnableLUA and set to 0 completely disables UAC. But I wouldn't recommend it, and also note that you'll lose Metro applications since they depend on UAC. –  Xandy Nov 2 '12 at 11:52
1  
You need to force ownership of all files. You likely upgraded in a strange way, since you used the term "migration" and "clean install" which if you actually "mirgrated" it wouldn't have been a clean install. There are dozens of articles on how to take ownership of a file on Windows. –  Ramhound Nov 2 '12 at 11:53
    
Thanks for your response. By clean install - I mean I didn't upgrade, but Windows Installation migrated my OLD OS to Windows.Old. I have read a few articles and will continue to look. Even though I have full control over a log file for example (I'm in Administrator Group and Changed Specific File Ownership) I am still given the same error. –  Dane Balia Nov 2 '12 at 12:09
    
@DaneBalia - Did you change the user owner of the file, just changing the group, won't update the specific uid guid permission information that windows uses. –  Ramhound Nov 2 '12 at 12:51
    
That's not a permissions error. –  SLaks Nov 2 '12 at 13:00
show 1 more comment

2 Answers

I installed my Windows 8 in a very similar way, and was left with many folders that required elevated permissions for write operations. Your .NET applications are probably under an account that cannot perform these actions, whether they be writing to these folders in general or elevating (I'm not terribly informed on how .NET applications work.)


Luckily the solution should be fairly simple. Take ownership of the folder.

For example my PerfLogs folder has some messy permissions (yes I realize PerfLogs has different permissions anyway, it was handy though). Try this with your logs folder. Open the properties and look at the security tab:

enter image description here

Click Advanced. You can see I don't have permission to even view the permissions. Your case might not be so extreme:

enter image description here

Click continue and take a look at the advanced security settings. Here's where I suspect might be going wrong for you:

enter image description here

If only administrators can write to your logs folder, and your .NET app isn't an administrator, logs aren't going to be written.


Dig around in to what user your .NET app is running under and figure out if write permission is allowed in the log folder. This won't be a hard and fast solution for you, because there problem isn't one. Worst case scenario, try adding Everyone with Full access temporarily to see if this solves your problem.

share|improve this answer
add comment
up vote 0 down vote accepted

I also found this helpful for those who might also suffer with the problem:

http://answers.microsoft.com/en-us/windows/forum/windows_vista-security/error-0x80070522-a-required-privilege-is-not-held/78cc11ec-c543-418d-9183-131318e9db8a

To completely run Windows 8 in Administrator mode as you cannot disable UAC the old way, check this out: http://www.neowin.net/forum/topic/1120770-windows-8-run-everything-as-administrator/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.