Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Sick and tired of "cannot overwrite you do not have permission to"

29 Oct 2015   #1
Blackmagic12345

Windows 7 Enterprise x64
 
 
Sick and tired of "cannot overwrite you do not have permission to"

Alright, ive been trying to edit files in notepad all day and im sick of having to open everything through notepad (or whatever other software im using) run as administrator. Its aggravating to have to open the start menu every time i want to do something and right click notepad > run as admin > search for file all over again. I just want to be able to click the file, open it, edit it, save then quit without having to deal with the "windoze think ur 2 dum 2 do dis, so it maek stop u." message that pops up (its the one where "You cannot save this file because editing the directory requires administrator privileges" or something like that.)
Ive been using this OS since about a year after its release, i know what im doing when i mess with the Program Files folders and files within those folders. How the heck do i make this thing understand that i am smarter than it?


My System SpecsSystem Spec
.
29 Oct 2015   #2
cyclops

Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

Have you tried just logging in as Admin?
My System SpecsSystem Spec
29 Oct 2015   #3
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Quote   Quote: Originally Posted by Blackmagic12345 View Post
How the heck do i make this thing understand that i am smarter than it?
​The irony.

Being apart of the 'Administrators' local group, you are free to make NTFS permission changes at any time, but knowing how to do so is usually the hard part, apparently.

Rather than us batting posts back and forth trying to figure out the correct procedure you should perform to rid your issue, Blackmagic, I've attached a slightly modified version of Brink's Take Ownership Shortcut registry tweak that will do things for you. Use it.


Attached Files
File Type: reg th-384545_Add_Take_Ownership_to_context_menu.reg (2.2 KB, 12 views)
My System SpecsSystem Spec
.

29 Oct 2015   #4
UsernameIssues

W7 Pro SP1 64bit
 
 

Pyprohly,
I'm not smarter than the Operating System :-)

Using an INI file as an example, the owner is the builtin:administrators group and that group has full control of the file via NTFS. If the user is a member of the builtin:administrators group, then why must the ownership and NTFS permissions be changed to allow editors running at the Medium Integrity level to make changes to the file?

Sick and tired of "cannot overwrite you do not have permission to"-vnc.png

I see no need to change the file's ownership. Adding/Giving my user account NTFS write permissions is enough.


My System SpecsSystem Spec
29 Oct 2015   #5
Blackmagic12345

Windows 7 Enterprise x64
 
 

@cyclops, im the only user on the system so its pretty hard not to lol
@pyprohly, thanks a mil. You just saved me a million headaches
My System SpecsSystem Spec
29 Oct 2015   #6
Layback Bear

Windows 7 Pro. 64/SP-1
 
 

I'm wondering how the permission got changed in the first place.

Permission was correct.
Permission was not correct.
Now permission is back to being correct.
My System SpecsSystem Spec
29 Oct 2015   #7
Stevekir

Windows 7 Home Premium 64bit
 
 

Quote   Quote: Originally Posted by cyclops View Post
Have you tried just logging in as Admin?
How to do that please?

When I start my computer I just press the big blue button on the case which lights up and the machine starts. I am (I think) the Administrator (the shop who built it said so) but have never seen a pasword being needed. So perhaps I am not the Administratoe after all, which I would like to be (no-one else uses my machine).

Also, I'm not clear about the concept of Logging In. I see no opportunity to do that, just the blue button which causes a startup (as above).

EDIT: I have come across this image, showing I am the Administrator.

My main question however is how to understand logging on.


Attached Images
Sick and tired of "cannot overwrite you do not have permission to"-untitled-1.jpg 
My System SpecsSystem Spec
29 Oct 2015   #8
UsernameIssues

W7 Pro SP1 64bit
 
 

Quote   Quote: Originally Posted by Layback Bear View Post
I'm wondering how the permission got changed in the first place.

Permission was correct.
Permission was not correct.
Now permission is back to being correct.
The permissions (and ownership) on the files are correct. The permissions were correctly set by the operating system during the installation of the various apps. Nothing has changed the permissions (yet).

The problem is, some apps still cling to using INI files (or other configuration files) that they place in the Program Files folder. Putting those type of files in that protected folder structure is not a good idea for Windows 7. It was not a good idea for XP or Vista either. My screenshot in post #4 shows an INI file for UltraVNC. If I want to edit that file, I can either use the tool that UltraVNC provides or open the INI in a text editor that is running as admin. It gets rather annoying to navigate to these types of files via Notepad's File > Open dialog box. The OP would rather use Windows (file) Explorer and just double click to open/edit files like this.

One solution is to make a shortcut file with a target like this...
Code:
%windir%\system32\notepad.exe "C:\Program Files\uvnc bvba\UltraVNC\UltraVNC.ini"
...then change the properties of that shortcut to run as admin. A user would need to make a shortcut like that for each configuration file of interest. The user would still need to deal with the UAC, but the native Windows file protection scheme would remain intact. And that is a good thing :-)

This might work too:
Elevated Program Shortcut without UAC Prompt - Create
I have not tired it.


Edit: in the info above and the info below, I intentionally left out the discussion about access tokens. However, this makes it sound like the the primary reason for the editor cannot write to a protected file is the editor's integrity level. The normal process for assigning the needed access token to the editor will raise the editor's integrity level to high. You can watch this via Process Explorer.


Quote   Quote: Originally Posted by Stevekir View Post
Quote   Quote: Originally Posted by cyclops View Post
Have you tried just logging in as Admin?
How to do that please?
~~~
Logging in as admin is of little value in this situation. Apps (like notepad) that you start while logged on as admin (administrator) should still run at the normal Medium Integrity level. That integrity level is not enough to edit the protected files that we are discussing. The text editor needs to be running at the High Integrity level (run as admin) to be able to edit these files - or - you have to lower the protection level of these files (bad idea).

By default, Windows (file) Explorer runs at the Medium Integrity level. If you use the Windows (file) Explorer to navigate to a text file and then double on that text file, notepad should start at the Medium Integrity level. Some noteworthy exceptions to that norm are web browsers like IE and Chrome. Both of those start at the Medium Integrity level, but then they start other copies of themselves at lower Integrity levels. Those lower copies show you the websites. The lower the Integrity level, the fewer things that the browser can infect.

Your Desktop and Taskbar are presented to you by the Windows (file) Explorer running at the Medium Integrity level. Double clicking on a normal shortcut (icon) on the Desktop or Taskbar is just like the info presented in the paragraph above.

The bad guys are always finding ways to make browsers and/or PDF readers escape those lower Integrity levels. That is called privilege escalation.


If anyone is still awake at this point, the shortcut methods mentioned above are the safest solution to the OP's issue. The next safest thing is to add your user account to the NTFS permissions. You only need Write permissions. You do not need Full Control. And you should only change the file(s) of interest. Don't change the permissions on the entire app folder... and certainly don't change the permissions on the entire Program Files folder.

Or - you could throw all caution to the wind and turn off the UAC. Doing that lets most everything run at the High Integrity level - including infections. [There are security apps that can be used instead of the UAC.]


While I'm putting people to sleep with this topic, I'll go ahead and mention the VirtualStore folder. If an app that is running at the Medium Integrity level needs to write to an INI file in the a protected folder structure. Windows 7 might try to help you out by placing a copy of that INI file into the VirtualStore folder. I wasted a lot of labor before I figured that out. In my case, the INI file was in the Windows folder and the VirtualStore folder. The two copies contained different info. I could not tell the old app to look for the INI file in another place. [Yes, I know about hard and symbolic links. That was not the best solution in this case.]

One final point: If computer #1 is connected to computer #2 via the admin share (C$), then changes to the protected files on computer #2 can be made from computer #1 without any UAC prompts. Infections on computer #1 can do a lot of damage to computer #2.
My System SpecsSystem Spec
30 Oct 2015   #9
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Quote   Quote: Originally Posted by Blackmagic12345 View Post
@pyprohly, thanks a mil. You just saved me a million headaches
Enjoy.

Quote   Quote: Originally Posted by Layback Bear View Post
I'm wondering how the permission got changed in the first place.

Permission was correct.
Permission was not correct.
Now permission is back to being correct.
No permissions were changed. Blackmagic states that his problem file resides under the 'Program Files' folder, and it would make sense that editing anything in there must require UAC's approval.


@Stevekir Please start a new thread for your unrelated question.


Quote   Quote: Originally Posted by UsernameIssues View Post
I'm not smarter than the Operating System :-)
Yes you are. It'll be some time before computers become more intelligent than a brain.

Quote   Quote: Originally Posted by UsernameIssues View Post
If the user is a member of the builtin:administrators group, then why must the ownership and NTFS permissions be changed [...] to make changes to the file?

[IMG]

I see no need to change the file's ownership. Adding/Giving my user account NTFS write permissions is enough.
I think you know why the NTFS permissions had to be changed—that was the cause of OP’s problem—but the taking ownership part, on the other hand, I’m glad you questioned that because taking ownership is indeed hardly necessary in Blackmagic's case.

As per the intention, the registry tweak I've attached is only a parody of Brink’s, so I kept most bytes the same. By keeping the file as similar to the original as possible, its functionality will be familiar to those who are familiar with Brink’s file. I didn't bother pulling out the Takeown command in concern that the resulting file will differ too much from the original. And modifying the file as less as possible saves me the effort too.

Also, if I were to keep posting back and forth to Blackmagic and eventually establish some set of instructions he should perform to fix his issue, it may only be relevant to that file/folder of his, and he probably wants the process done to multiple items. Providing the registry tweak with Takeown not only saves time on my behalf, but also the OP’s, all while maintain a high success rate.
My System SpecsSystem Spec
Reply

 Sick and tired of "cannot overwrite you do not have permission to"




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
"Date Modified" doesn't change after Overwrite
Just recently, I've noticed an issue where the directory field "Date Modified" does not change after a copy/paste/overwrite using Windows Explorer. Background Info: To update images on several websites, I've been simply overwriting the old image files and syncing via DreamWeaver. I believe this...
General Discussion
Gigabyte EasyTune 6 Removal "You require permission from SYSTEM to.."
Just to give an explanation of what happened.. I reformatted my PC (I like to do this often, probably once every 2-3 months. More frequent if I deem it necessary) and I was installing drivers and the likes.. Windows Update, etc.. I was installing EasyTune 6 (This is basically a Fan Control...
Drivers
Can the "previous version" feature of win7 overwrite newer files?
hello, title says it all. i'm worried about my personal files (docs etc.). somebody please clarify, whenever i used system restore, windows said "your personal files have not been changed". in which cases would that be so?
Backup and Restore
Denied permission when trying to get access to folder named "1055"
From somewhere, somehow, a folder named "24cd9e4542d29590bce925ec30" has been created in my W7x86pro root dir. Trying to look inside, I had to "permanently get access". But then inside it, there are a whole lot of folders named things like 1025, 1028, 1029, etc, ending with 3076, and 3082. ...
General Discussion
Taking "Ownership" of old HD - "You currently don't have permission...
I built a new system (64 bit windows 7) and would like to copy some files over from my old HD which was Windows XP 32bit. The old hard drive is healthy and functioning correctly. I'm greeted with the all too well known message "You currently don't have permission to access this folder. Click...
General Discussion
Folder Shared, Permission Granted File "Access denied"
On both 64Bit & 32Bit Win7 machines I get an error message, denying access to a file in a folder within another folder. All have been shared, permissions granted & drives mapped to each folder. That is in addition to initially applying the changes to the file folder, subfolders, and files. The...
Network & Sharing


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 18:05.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App