Troubleshoot program problems caused by NTFS permissions

Source: Internet
Author: User
Tags ntfs permissions

Windows 7 on the home desktop computer was installed when I first purchased it the year before and has not been reinstalled. No third-party optimization software was used during this period, but everything went fine. This indicates that Windows can run stably for a long time without regular reinstallation or optimization software.

However, this system has encountered a problem recently. Every day, the mcupdate.exe process is abnormal and cannot be executed normally.

Because Visual Studio is installed in the current system, a dialog box Indicating whether to debug with Visual Studio is displayed when an exception occurs.

  Mcupdate.exeIt is an update program for the Windows Media Center component (included in the home advanced edition of Win7 or later). It is used to detect and update the online services and TV program guides provided by Microsoft for the Media Center. For example, the "Internet video" function is not included in Windows and is installed in the system through the mcupdate.exe network update method.

If you have not run Windows Media Center, the update program does not run. If you have run Windows Media Center, it is periodically called and executed by Windows "Task Scheduler. This is why an exception occurs every day.

Fortunately, Windows Media Center is based on Microsoft.. NET Framework. Because MSIL code is run rather than binary code, debugging is convenient without obfuscation or encryption. After debugging, you can see the cause of the error:

Failed to recover store: C: \ ProgramData \ Microsoft \ eHome \ mcepg2-1.db

It means that the mcepg2-1.db file of the TV program guide database for Windows Media Center cannot be restored. First, open the file location to see if there is any exception. The file looks good and everything looks normal. It doesn't matter. Continue to view exception information in Visual Studio and click "View Details ...", You can see the following content:

Originally, this exception was caused by another exception: cocould not open file stream: [c: \ programdata \ microsoft \ ehome \ Counter. mem]. error code: 5. the file Counter cannot be opened. mem, But I can open this file normally.

However, if mcupdate.exe is started by the task scheduler rather than the user, the user account used should be the system service account, not the administrator account, it may be because of the NTFS permission that the system service account cannot open this file. View the attributes of these two files and the account permission information of mcupdate.exe. The content is as follows:

Sure enough, the program runs as a network service account (affiliated to the Users group), and files with access errors only allow the Users group account to have read permissions. After manually assigning read and write permissions to the Users user group, find the mcupdate task in the system's task scheduler library and run it manually. It works normally and no exception occurs:

However, in my opinion, the permissions of these two files must be modified, which will lead to such problems. What are their default permissions? One way is to check the file permissions in other normal systems. In addition, you can try to delete them to see if the program can automatically create them. If yes, you can assign them a correct list of NTFS access permissions.

For the sake of insurance, I backed up the C: \ programdata \ microsoft \ eHome folder, deleted it, and manually ran the mcupdate task. Naturally, the program automatically created an ehome folder, let's look at its folder permissions. It turns out to be like this:

In addition, all files in the ehome folder inherit its permission list, so now there should be no problem.

I did not go into details about the reason why the permissions of this folder were modified, but this question inspired me to test and check the access permissions in the future troubleshooting process, sometimes, even if there are no problems with other aspects of the file, the wrong access permission will also cause some trouble, so we advise you not to modify the NTFS permissions of system files and folders at will in the future, maybe it's not that easy to troubleshoot next time.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.