Windows 10 and Netbeans: no write permissions - windows

I've installed Netbeans 8.2. on my clean Windows 10 install. Now I want to set up a new project, but when I select my source folder I get the message 'Sources folder is not writable'.
Then I decided to just change my HTML code, but when I save I've got the message 'Cannot get exclusive access to: D:\Websites... (probably opened for reading)'.
I tried to open Netbeans as administrator, but nothing seems to work. Anybody who had the same problem and could solve it?
Thanks!

If the cause is same as me, check your Antivirus settings, and whitelist Netbeans.
I've experienced the same an hour ago, after checking the writing permissions and creating a new project all together, nothing worked. Then I remembered I have an antivirus (Bitdefender) with Ransomware protection for my documents folder, I went to the log (of Bitdefender) and yeah, it was blocked as suspicious software, just added it to the trusted list and it works fine now.

You might try running Netbeans as an administrator.

I solved the problem by allowing the "Netbeans.exe" file through Control folder access.

If someone finds it is not solved by the solution of #Osama Islam. Try to open the file like this:
Select the file in Projects window in netbeans --> right click on it --> Then select "Edit". ---> Now try to save the content.

I too faced the similar issue and not running any anti virus, the issue is mainly due to permission so I fixed it by giving full access to user for that particular folder, which fixed the problem
ICACLS "FolderPath" /INHERITANCE:e /GRANT:r username:(F) /T /C
Replace the FolderPath and username as per need
Reference: changing permission through command prompt

Just look for programs who have the file open. In my case I executed git diff myfile.js which was blocking the save process.

I faced such a problem today.
On windows 10, If you not installed any antivirus software, check your windows difender protection history. windows difender blocks the folder modification access. In protection history, find the relavent notification and select allow on device. now this error might be solved!

Related

Alfred unable to remember my preferences and always does reset after re-launch

Alfredapp in mac cannot remember my preferences. All my settings would be reverted to default while I relaunch the app.
I don't have Dropbox Sync in settings and I tried to repair the permission in Disk Utility, but it is still not working.
I found out a way to resolve this issue in https://www.alfredapp.com/help/troubleshooting/preferences/ with the fourth one "4. Create a New User Account" is helpful.
But I think I can't switch to an new account. So is there anyway to resolve this ? What happened to my current account ? Can I repair my account to make everything well ?
Thanks a lot.
You can try to set the following configuration:
Advanced->Syncing->Set sync folder
Set the folder to your user's directory. Just like ~/backup/alfred3.
Make sure your Dropbox does not take control of it. Then restart your alfred.

Why does .MSI file open read-only?

I am attempting to open a .MSI installer package file to modify it. Whenever I try to open it, it opens in read-only mode. I see this with Orca, with InstEd, or when opening the file directly via code:
`MsiOpenDatabase()` (ERROR_OPEN_FAILED with MSIDBOPEN_DIRECT or
MSIDBOPEN_TRANSACT persistence modes).
The file itself does not have the read-only attribute set (in fact, has no attributes set)
I am using an account with Administrators group access
As far as I can tell, no other process has the file open
No installs are in progress or suspended
I can copy the file to another location, and open it read/write there. But the original, I cannot touch
Thanks in advance for your help.
My guess is that this is caused by one of the following factors:
Custom NTFS access rights - defined for the file in its security descriptor
The file might be "blocked" - marked with a special flag after being downloaded via Internet Explorer.
The resolution for the latter is to right click the file and select properties and click the unblock button at the bottom of the property page and pressing OK.
The resolution for custom NTFS rights are done in a similar way by going into the security
tab of the property page for the file, but it is easier just to copy and paste the file and use the fresh copy with the default security.
Found it.
#Glytzhkof, you almost had it but there's a detail I did not know about, and left out. This is a package that lies in a folder under "access protection" by my system's anti-virus program: a filesystem hook that blocks modification of critical system and AV files. Turn off access protection temporarily, and the file is wide open.
Fortunately, one of my teammates had some experience with this, and suggested I try it. Bingo.
Thanks, all.
What I have done to get it working was to create first a backup of the MSI file, and then open that backup. It worked for me
Try to close/kill processes that might interfere, for example:
Other running Install shield instances
Installshield updater
Installshield licensing service
Antivirus

your preferences cannot be read

I have a problem every time I open the chrome.
I'm getting the error message:
Your preferences cannot be read.
Some features may be unavailable and changes to preferences won't be saved.
So, I have to sign in at chrome every fresh start.
I have search the web and the solution to reinstall chrome doesn't work for me. I find that the problem is a missing folder but I don't know who.
My operating system is Windows 8. Any help to overcome with my problem is more than appreciated.
Exit Google Chrome completely.
Enter the keyboard shortcut Windows key+E to open Windows Explorer.
In the Windows Explorer window that appears enter the following in the address bar:
%LOCALAPPDATA%\Google\Chrome\User Data\
Locate the folder called "Default" in the directory window that opens and rename it as "Backup default."
Try opening Google Chrome again. A new "Default" folder is automatically created as you start using the browser.
fix, error: preference files cannot read."
go to control panel
programs
uninstall
click on program getting error.
click repair
this fixed my problem.
this problem can be solved easily.. once you have setup everything after the error message i.e bookmarks and sync, Run CHROME IN "ADMINISTRATOR MODE" every time you want to open chrome..that solves the issue..

IIS Express 8 - Cannot write configuration file

I am trying to use IIS Express 8 for a MVC site in VS2012. I am getting the following error whenever I attempt to create the site:
Filename:
\?\C:\Users\xxxxxx\Documents\IISExpress\config\applicationHost.config
Error: Cannot write configuration file
Is there some way to force IIS Express to use a different location for the config & logs folders? I understand I can point to a different location when I am running iisexpress.exe from the command line, but I have no control over this when using Visual Studio.
Alternatively, has anyone got any suggestions why the error is happening? (Side note: My laptop is in a corporate environment which has some stupid encryption on the "Documents" folder, however I haven't had any problems with other software that saves to this location. I also have given the "Everyone" group full access to the folder.)
EDIT - After following the instructions at http://learn.iis.net/page.aspx/1286/iis-80-express-readme/ I still can't seem to get this working. I've tried the following:
Added HKCU\Software\Microsoft\IISExpress\CustomUserHome registry key pointing to my alternate directory
Added HKCU\Software\Microsoft\IISExpress\8.0\CustomUserHome registry key pointing to my alternate directory
Added HKLM\Software\Microsoft\IISExpress\CustomUserHome registry key pointing to my alternate directory
Added HKLM\Software\Microsoft\IISExpress\8.0\CustomUserHome registry key pointing to my alternate directory
Setting the %IIS_USER_HOME% environment variable pointing to my alternate directory.
Any other suggestions?
#Brad
I had your same problem just now. Removing the encryption on the IISExpress folder and the "Read Only" attribute solved it. In my company Documents is also encrypted, but I don't think removing that encryption from IISExpress would be a problem of any sort.
Hope this helps.
I had a very similar error message caused by a completely different problem.
The Error:
C:\VS\TFS_Projects\SomeSolution\SomeProject\SomeProject.csproj : error : Creation of the virtual directory http://localhost:55063/ failed with the error: Filename: \\?\C:\VS\TFS_Projects\SomeSolution.vs\config\applicationhost.config
Error: Cannot write configuration file due to insufficient permissions
More Details: I couldn't even open the project, as opening it would fail.
I could get prior changesets, and they would actually open fine, but if I got latest the projects couldn't be opened.
Solution: In my case, it turned out that when we changed TFS servers, someone had added the ".vs" folder to source control along with everything else. Under which, one developer had his applicationhost.config set up to run sites on a D:\ drive, while I had no such D:\ drive (well, it was a DVD drive.) I was able to get this working by finding a prior changeset with the un-altered applicationhost.config and replacing my local file. (I could have attempted to actually delete the folder, but I didn't go that route.)
Afterwards, we removed the ".vs" folder from source control.
(I put this solution here because it's where google landed me, so other people having this error message might find the above solutions don't fix it for them, and thus they might be having this problem.)
I'm also in a corporate environment with Encryption on the users folder, and removing encryption and removing the read only flags on everything in the IISExpress folder worked for me.
I'm using Visual Studio 2017 on Windows 10 and to fix this problem I had to disable the OneDrive setting "Save space and download files as you use them". After changing the setting my computer crashed but after rebooting I was then able to change SSL Enabled and everything worked.
For anyone googling this; this might be the same problem as this: http://connect.microsoft.com/VisualStudio/feedback/details/878812/use-iis-express-is-broken-in-vs-2012-on-windows-8-1
You can check it by downloading Prcocess Monitor and run it with a filter for "Path" contains "\Documents\IISExpress\config" and then try to change the project to use IIS Express. If there is a CreateFile entry with the result 0xC0190052 as one of the last entries then this is the same issue.
After struggling with this, and verifying encryption and read-only attributes, and having them not work, my solution ended up being:
Navigate to the folder containing the IISExpress folder (in my case, it was in my OneDrive, not Documents folder)
Right click on IISExpress folder > Security tab > Advanced button
Change Owner to yourself, even if it already is
Check the "Replace owner on subcontainers and objects" box
This may not appear until you've completed the Change owner dialog
Open the IISExpress folder
Right click on config folder > Security tab > Advanced button
Add a user > Add principal
Change location to local machine (and not a domain)
Enter the name NETWORK SERVICE and "Check Names"
Press OK to get back to the Advance Security dialog
Make sure to check "Replace all child object permission entries with inheritable permission entries from this object"
Worked in Windows 10 with IISExpress 10, for both VS 2013 and VS 2017.
C:\Users\xxxxxx\Documents\IISExpress\config\applicationHost.config
Uncheck the read-only attribute from the file. It worked for me.
Adding the registry entry seemed to work, however, using environment variables in the registry entry did not. In my environment only our documents directory is redirected, so I simply wanted to move the IIS Express config directory up one level to the %USERPROFILE% directory. However, that did not work. IIS Express read the environment variable literally and of course failed to run.
I had the same issue before, running VisualStudio as Administrator (Run as Administrtor) resolved the issue.
I also had the problem and tried to fix it with setting the registry key in HKCU\Software\Microsoft which didn't work.
The error I made, was using HKCU because, since I do not have permissions to edit the registry under by normal account (which I use to run visual studio), I was using an administrative account. Then of course, HKCU was for that account.
So I just used HKEY_USERS\"my normal user's SID" instead and, when starting iisexpress.exe manually, it created its files at the location indicated. What still didn't work was using iisexpress from visual studio. It still seemed that VS didn't use the registry setting at all.
Finally I resorted in setting a non UNC path for Shell Folders\Personal and User Shell Folders\Personal in HKU\"my normal user's SID"\Software\Microsoft\Windows\CurrentVersion\Explorer\ which did the trick.
I received the same error but in a different context. Opening a project (.csproj file) provided by another developer returned this error and failed to do anything:
Creating of the virtual directory http://localhost:58753/
failed with the error:
Filename: \?\C:\Users\xxxxx\Documents\Clients\xxx\Gen
II\xxx\,vs\config\applicationhost.config
Error: Cannot write configuration file
I removed both Encryption and the R/O attribute from the directory containing the project files and applied to all subfolders and files. Visual Studio can now read the project.
In my case I moved the folder to another location, so I had to edit the applicationhost.config file and changed the virtualdirectory entry to the new location. Removing encryption and setting read only off did not help. I imagine if I had just copied it instead of moving it, it would have happily continued working.

xcode The document "..." could not be saved

I use xcode 3.2.4 on snow leopard. Today when I tried to save a file on my project I get an error message saying: The document "nameOfFile.m" could not be saved. I tried reinstalling xcode but no luck. The file can be edited with other editors and I see the same behavior on all my projects as well as newly created projects. Any ideas?
Simply by rebooting the computer the issue was fixed.
We were having this problem in a lab environment where user files are mounted via NFS.
The client machines are running OS X 10.6.7 and the file server is running Debian Linux.
After much grief and reading /var/log/syslog on the client machine I discovered it was a subtle file locking / race condition issue with the file system. Evidently, when editing files in a "bundle" (e.g. as in an Xcode project), the OS is using some form of "safe writes" which involves writing transient data atomically to ~/Library/Caches/TemporaryItems/ (which of course is on the NFS mounted system) -- there is a race here that requires proper file locking. We hope we have fixed the problem by changing the nfs_mount options
as described in Mounting NFS volumes in OS X
Not sure why but the temp files ended in a odd state. In "/private/var/folders" I simply removed all the folders and it cleared up the problem
cd /private/var/folders
sudo rm -fR *
Note: never do a "sudo rm" unless you really know what you are doing. It can cause irrecoverable damage
I restarted XCode (by a force-quit, not just closing it) and that fixed it for me.
Make sure you have you mouse focused on the code area and not the file in the file list.
Cleaning the project (Product > Clean), then force quitting Xcode (Command + Option + Escape, select Xcode, click Force Quit) solved the issue for me. I'm not sure if the clean was necessary, but that was what I did. Upon re-opening the project, I let Xcode index the project before doing anything, then did a Build, and all is well.
Force quiting Xcode for me worked. I would recommend the same.
Hey........... even i faced the same problem..... But got the answer......
steps:
reveal in folder the project.
select the file that is locked
select 'GEt Info'
deselect ie uncheck the label 'LOCKED' in the Info.
I just ran into the same problem, then I noticed I ran out of disk space. You can disable the warning that pops up when you run low on disk space (perhaps not a wise thing to do). I did that a few days ago and was puzzled for a moment when this message appeared. They could've just said "Disk full" or something instead of "cannot save". Anyway if anyone ever runs into this just free up some disk space.
You might be able to save in an external editor because its not also building your app which might use up the little remaining space. It might also be why it worked after rebooting (if OS X cleaned up some cached stuff on reboot) so it seems plausible.
Either that or your HDD might have just crashed.
tic....tic....tic.....
In my Case, the File which was saying document could not be saved was basically Shortcut/Allies of the file present at another place.
I don't know why it was not able to save if it was opened by shortcut/allies in xcode but by overwriting(Copy and Paste) the orignal files to that shortcut my problem was solved.
Regards
Umair Bhatti
1.Right click on that file
2.Go to Show in Finder .
3.Click on get info .
4.Goto Sharing & Permission
Everyone,username,Fetching & selection ----You can choose appropriate read write option.
I have face this issue many times. I followed below steps to fixed this.
1. Select file->Show in Finder
2. Copy those file and past different destination.
3. Remove those file from xCode (to selecting show in finder)
4. Then again add those files from other destination to actual location
5. Clean code and run the code.
Another possible reason is that the file you are trying to modify is an alias (i.e. a soft link).
You will have to modify the source file directly in this case.
Thanks #Wayne Cochran,
When I use Xcode to save it, I rebooted the machine several times, and all failed.
So I changed to Visual Studio Code to edit and save. Then it's OK.
Just change the file editor
This can happen when you are working with a network hard drive (or are on a cloud) and not connected to the network (connection lost)

Resources