Unable to edit and save a file on remote machine using Notepad++

Notepad++

Notepad++ Problem Overview


I am using Notepad++ 5.3.1. I want to edit and save files on a remote machine (both are running on Windows XP). I have granted the access privileges and security permissions in the folder containing the files.

When I try to save any of these files after editing in Notepad++, I get the following error.

 'Please check whether if this file is opened in another program'

There are no other places where the file has been opened but I still get this error. I was able to edit and save earlier but this error seems to be coming only since yesterday.

Notepad++ Solutions


Solution 1 - Notepad++

I have fixed the issue now. The problem was that though the permissions have been set properly on the root folder the subsequent child folders were not inheriting the access privileges. Therefore when I suddenly edited a file in one of the child folders this error cropped up. I went to the advanced tab under security settings of the root folder propeties and checked the option

 Replace permission entries on all child objects with entries shown here that apply to child objects

Thanks one and all

Solution 2 - Notepad++

Opening the editor (Notepad++) on administrator mode could have helped too!

Solution 3 - Notepad++

gsk is correct! It's permissions!

Properties > Security > Edit > Users -> Allow (checked on everything) and then "OK" and "OK" so it saves all the settings.

Solution 4 - Notepad++

Actually, it's a much simpler answer.

If you opened the file in a Windows Explorer window, and you have the preview pane enabled, it locks the file. If you deselect the file in the window, it will make the preview go away, and the file will be unlocked again.

I did a post of this file locking problem on my blog, if you want more info and a screenshot.

Solution 5 - Notepad++

I had the same problem with the file C:\Windows\System32\drivers\etc\hosts. I resolved it by opening the file by NotePad++ run as administrator.

To run Notepad++ (or any other program) as an administrator just right click on the application and select "Run As Administrator."

Solution 6 - Notepad++

Another possible reason I just discovered:

Antivirus software can block access to the file, even though the ACL permissions (under Security) are correct.

I just noticed that because on one occasion (not sure if it was due to my attemt to save the file or change it's ownership to administrator) the antivirus-software displayed a notification window that the access was blocked.

Solution 7 - Notepad++

Two things come to mind to try:

  1. Map a drive and connect using mapped drive instead of a URI.
  2. Make sure you have permissions to create files on remote server as well. Sometimes these text editors create a temporary file before re-writing the saved information.

This also might be a question better suited for Server Fault.

I hope this helps!

Solution 8 - Notepad++

I got the same error while using WAMP. I went to the file location (www folder), right clicked and refreshed the folder.

Solution 9 - Notepad++

Had the same problem sometime back and didn't understand why, recently when it happened I simply granted full control to my user account for the root folder where my files were. After that the error did not appear again, just like GSK said back there.

Solution 10 - Notepad++

My problem involved WinSCP and the solution I did was to uncheck "External editor opens each file in separate window (process)" in editor preferences.

Solution 11 - Notepad++

Solution is simple.. Right click on Notepad++ shortcut -> Run as administrator.

Solution 12 - Notepad++

I opened the file using Notepad++ as an administrator, but I still had the same issue:

> Please check whether if this file is opened in another program

Then I made a copy of the file in another location followed by a copy and replace of the original file. This solved my issue.

Solution 13 - Notepad++

Open Notepad++. Right click -> Properties -> "find your name" under the Security tab -> right click allow for read, write, read and execute, full control.

Apply changes. Now save the content you would like to save.

Solution 14 - Notepad++

Permission of administrator (operating system User), as it has been blocked. So log-in as administrator and give the share permission to another user (where you want to edit).

Solution 15 - Notepad++

I had the same problem when setting up the Apache webserver and PHP. This was due to the UAC on Windows 7. It's is not because you have the file open anywhere else. Try opening Notepad++ as administrator. Either right click Notepad++ shortcut and choose run as administrator or Ctrl+Shift and click Notepad++ shortcut. Then open the file you want to edit from within Notepad++.

This solved the problem for me.

Solution 16 - Notepad++

This issue can occur when another user (e.g. administrator) owns the file and does not give everyone else write access. Here is how to give write access too all users for all files in current directory and all sub-directories.

Open an administrative console, go the the root of the directory where the file(s) are. Type:

icacls "." /grant Everyone:(F) /T

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestiongskView Question on Stackoverflow
Solution 1 - Notepad++gskView Answer on Stackoverflow
Solution 2 - Notepad++nadhView Answer on Stackoverflow
Solution 3 - Notepad++tfontView Answer on Stackoverflow
Solution 4 - Notepad++mitchfView Answer on Stackoverflow
Solution 5 - Notepad++ShessukyView Answer on Stackoverflow
Solution 6 - Notepad++FriendFXView Answer on Stackoverflow
Solution 7 - Notepad++RandyMorrisView Answer on Stackoverflow
Solution 8 - Notepad++NavigatronView Answer on Stackoverflow
Solution 9 - Notepad++KletView Answer on Stackoverflow
Solution 10 - Notepad++ZackView Answer on Stackoverflow
Solution 11 - Notepad++Chetan NellekeriView Answer on Stackoverflow
Solution 12 - Notepad++jones j alapatView Answer on Stackoverflow
Solution 13 - Notepad++chanakya SView Answer on Stackoverflow
Solution 14 - Notepad++KarShoView Answer on Stackoverflow
Solution 15 - Notepad++Seif TmlView Answer on Stackoverflow
Solution 16 - Notepad++N0thingView Answer on Stackoverflow