Files randomly becoming protected, requiring Administrator mode
I’ve been using Notepad++ for my HTML homework for the past few weeks and it seems to randomly protect my files and force me to re-open in Administrator mode in order to save them. Normally I just copy and past the whole file into a new copy to work around this problem but it’s becoming an annoyance, how can I stop my files from becoming protected seemingly on their own? Is there a keybind I may accidentally be pressing that’s triggering this?
You must be launching Notepad++ as administrator and then saved files becomes owned by the admin.
Basically you should try very hard NEVER to run Notepad++ (or any application except for setups) as admin unless you really need to. This can happen if you open explorer as admin and open a file from there. Ever since XP while every version of Windows becomes worse and worse it is too difficult to notice when you become admin by mistake.
Do you use Notepad++ backup feature? If you do, then (I assume that) old file is renamed and a new file is created with ownership of current user. If you turn off backup then perhaps old file will be modified instead of created and retain its permissions. New files will still exhibit the problem.
Additional option is to carefully set the permission structure on the directories you work. Files inherit permissions from the directory they are in and if your user account has FULL permissions then you should be able to overwrite files even if they are owned by the admin.
Anyway, if it happens you should modify file permissions from explorer and not copy-paste files contents. You can do so recursively from top folder.
After Notepad++ installs an update it opens the new Notepad++ executable to show the file containing the details of the update. This execution is in administrator mode. It is easy to continue using the program to edit other files and so they can be saved as owned by administrator. I have got into the habit of reading the update details then exiting Notepad++ before reopening it as a non-administrator to continue my real editing.
that has happened to me when i edited a text file on a flash drive, and the flash drive became unplugged. the message showed up when i tried to save. (ctrl-s)
if you are working on a network drive, it may be that the file location is becoming unavailable.
also could happen when another program accesses your file in an exclusive mode.
virus scanner maybe?