PHPStorm thinks that my main folder, where my projects are, has "read-only" status. It says "could not save project".
The way it started was that I used a command line tool, it may have been cygwin(a linux based command line tool), or cmd or windows powershell, following a tutorial which was mac oriented. It showed how you could change permissions on folders. It was some time ago and I don't have the tutorial anymore. I don't remember the commands I made, but I only changed permissions on my project folder just to try it out.
I have then changed the permissions back on the folder so that both administrator and normal users have full access to it. But I did it by right clicking the folder and go to "security". PHPStorm still displays the read-only message and can't save the project.
I would greatly appreciate a solution!
Related
The above error recently started being thrown when I was making updates to an existing C# windows app that saves a folder location for files it uses.
Upon receiving this error, I found that my whole hard drive seems to be set to read only. (recently had to build a new dev system) I have tried changing the folders back to being readable via folder properties. Dialog pops up and goes through all the files as if it were changing the properties. When I open the properties immediately after, the folder is back to read only.
I have also noticed that VS IDE does't save changes to the recent files/projects.
Anyone experience this and have the solution?
Things I have tried:
created a new admin user. Logged in and found the same situation. Not tied to my profile.
Tried command prompt changing folder attributes with attrib command.
Tried changing my users permissions to full control.
uninstalled OneDrive (to eliminate possible syncing issues)
Turns out my AppData folder hidden property was set to true. Setting this folder and all sub folders to not be hidden fixes everything.
I'm trying to create a SceneKit scene. I can create it, and edit it, but the moment I try to save it I get the error "The document “SceneKit Scene.scn” could not be saved.".
Affects every .scn I try to create, regardless of project (including brand new projects with no changes other than adding this .scn), and does so regardless of what changes (if any) I've made to the Scene (even no changes at all gives this message)
When I locate the file in Finder, neither the file nor the folder it's in are locked
Project is on main disk
Automatic saves also fail with the same error message
.scn file can be opened separately to the project, but again, it cannot be saved
Neither the default file name nor custom file names help, regardless of whether I change the name in the sidebar after the file is created or at creation time in the New File dialog box
Deleting the reference and re-adding the file doesn't help
Making a copy of the file, deleing the original (in Xcode), and re-adding the copy doesn't help
Cleaning the build folder doesn't help
Restarting Xcode doesn't help
Rebooting the mac doesn't help
Issue only affects .scn files as far as I can see (definitely doesn't affect .swift, .storyboard or .metal files)
Affects Xcode 10.0, macOS 10.14 (18A391) (Also affected previous version of macOS, but I can no longer remember which version that was)
Affects Xcode 10.1, macOS 10.14.1 (18B75)
Affects Xcode 10.2, macOS 10.14.4 (18E226) even worse, as it insists on saving before closing the project, but can't save, so I can only close the project or Xcode by force-quitting.
Affects Xcode 10.2.1, macOS 10.14.4 (without the bug from 10.2)
Affects Xcode 11.3.1, macOS 10.14.6
All my files are in my home directory hierarchy
Moving project folder to a different subfolder of my home directory (from ~/Documents/ to ~/Desktop/ or to ~/Downloads) has no effect
All files have the same user/group, both those I can write to and the .scn I can't write to
My user account is in the same group as the files (ls -l shows staff, as does Preferences.app > Users & Groups > [right click on my account] > Advanced Options… > Group:)
Exporting the .scn file (File > Export... ) and adding it to the project again doesn't help
It's only Xcode which has a problem saving this file: if I open it in TextWrangler, I can modify and save it without error. Saving it in TextWrangler did not make it saveable in Xcode.
Resetting user permissions (diskutil resetUserPermissions / `id -u` as suggested by #JeremyP)
didn't help.
The project is set to use git, and it doesn't help to commit, pull, or push
Why is Xcode failing to save .scn, all the .scn, and nothing but the .scn?
I had the same issue. Changing permissions did not work. Changing the group did not work. Exporting the scene did not work. In the end I tried the solution suggested here:
https://support.apple.com/en-us/HT203538
Actually, I skipped all the way to step 7 and I haven't done steps 8 and 9 yet, but this fixed the issue for me:
diskutil resetUserPermissions / `id -u`
Just run the above in a terminal session. Note that I am logged in as an admin user. That might make a difference.
Had the same issue with .scn files and Xcode 10. I solved it exporting the .scn file (File > Export... ) and adding it to the project again. Not a great solution but it works.
I had same problem but I manage to solve it. Now I can save .scn file no matter where project located. Before I solve problem I have to move my project under User's home directory in order to make it work.
kosua20 point out that "It seems that when creating or importing a .scn file it propagated the user/group and that caused the save to fail"
I create a project name Test under my another partition. When I open it and try to save it I got this message. You can see Test project is under BOOTCAMP while Macintosh HD has my OS and user home
Open your Terminal and cd to parent folder which has your project and type "ls -l" then Enter to see your folder permission. In my case my Test project folder have group permission of admin, but the account I am using is in group of staff(I will show you later how you can check it). Now I need to change permission to staff instead of admin in order to make .scn file to save successful.
Go to System Preferences -> Users&Groups Unlock it first then right click on user account you are using, it will pop up a menu "Advanced Options..." and click it
In pop up window locate Group and next to it has a name in input field and the name is primary group your account is current in. In my case my account is in staff. So far I can just change staff to admin then .scn file can be save successful but I don't want to.
Back to Terminal while you are in parent directory where it has your project then type "sudo chgrp -hR [group] [Project folder name]" then Enter. In my case I have to type "sudo chgrp -hR staff Test" (How command work see here: chgrp). In your case it depend on which group your account is current in and project folder name.
After that command if successful type "ls -l" then Enter again to check permission of group. If it is group name you are after then you can open your project and modify .scn file and save again to see if it work. In my case .scn is now can be save without any problem.
Check your project's group permission and then check if account is in that group, if not then you can either change your account's primary group which I don't recommend or you can use chgrp command to make change to project folder in Terminal. After all this you still have problem then I have no idea.
Hope this help.
Its a bug, all you have to do is rename the file in Xcode in the scene editor (on the left hand side where all the files are), mine is "ship.scn" - just rename it to whatever, hit enter. Then you can save. Hit save as. Rename back to original name and save.
Had the same issue with scn files not being able to be saved. In my case the project was saved in another disk and moving it to the main disk resolved it.
I've had the same issue with Xcode 10.1. The project was not stored in my home directory hierarchy, and it was assigned to the admin group instead of staff. It seems that when creating or importing a .scn file it propagated the user/group and that caused the save to fail. What solved it was to make sure that the .scn file and the whole Xcode project were owned by my user and in the staff group.
had the same issue in Xcode 10.2.1. I solved it by changed the location of project or you can create a project in different location.(In my case I synced with iCloud my desktop and documents that may be a problem) now I have created project in different location.
I had a similar issue with playgrounds failing to save, and repeated messages that the file could not be unlocked. I finally solved it by enabling full disk access for Xcode under security and privacy settings.
I had the same issue, I fixed my problem by a simple workaround.
You can select your objects in dae file in Xcode editor and hit command + c and create a new .scn file in Xcode and paste them using command + v there!
I am working with the deployment feature to easily upload files to a server. So opening a specific project folder for which I have already set up deployment gives me the opportunity to work with the project files instantly and also upload them without any problems.
The problem is with opening the right folder. When setting up deployment for a project you choose a folder as the 'root' folder for this one project and when one wants to load this settings he has to choose the right folder when opening a project. Sometimes there are some differences which folder is chosen as root (most of the time the folder is 'domain', but sometimes it's another folder).
When I now want open a project folder to work with the files and have the deployment ready, I can not recognize in the popped up window which folder is the right one. Friends of mine (win8/Linux) tell me that they have a phpStorm icon instead of the standard folder icon.
On the other hand I told OSX to show me the hidden files on my system which results in following:
As you can see Finder shows me the .idea file, so at least I know the folder I am at right now is the project folder. But I in the future I don't want to check first in Finder, which folder the right one is and then open phpStorm to open it there.
I hope anybody understands my problem :). Thanks for any tips, really annoying topic.
Update:
Maybe the problem comes with the fact that phpStorm on OSX uses Finder as the explorer when trying to open a project folder. The explorer on Windows looks similar
I posted on the jetbrains helpforum, the 'answer' was:
Relates to: https://youtrack.jetbrains.com/issue/IDEA-100279
Duplicates: https://youtrack.jetbrains.com/issue/IDEA-131303
Nothing anybody could have find out themselves, there does not seem to be a better answer than "give the folders related to PHPStorm the right icon, manually".
I am using VS 2010 and recently I moved some files around and changed paths etc.
The solution still compiles correctly and all files are able to be loaded/compiled without error however just about every time I go to compile after a change it gives me the save as dialog and asks me to save one of the projects, if I try to give it a new name or something the dialog does not exist nothing I do can make it exit apart from pressing cancel.
If I do a build straight after cancelling it works fine and I'm not presented with the save as dialog. I have verified that the project file is not read only.
Any ideas as to whats going on here.
The solution is stored in TFS 2008
You need to do 2 things
1- remove the read-only tick from the project folder
2- when a save-as window prompts at build, just overwrite the project
next time you build, the window won't pop up
You need to run VS as administrator. (right click on VS Icon- Run as administrator)
I solved the issue. When I try to save as this time it gives the error that file is being used by another process. Google Sync prevents to save so it opens save as dialog.
You should put your project under a folder not sync while working.
Are the bindings in TFS set up correctly with the new location? TFS will mark files as read only unless they get checked in. It might have been marked as such before you moved everything around, and now, isn't being checked out properly.
Also, try closing sync. files tools like google backup and sync.
I've recently switched from a Windows XP machine to Windows 7. I use Subversion and TortoiseSVN.
I cannot publish my .NET application in Visual Studio. I get over a thousand errors like this:
Unable to delete file
"obj\Debug\Package\PackageTmp\Views\ViewName.svn\text-base\ActionName.aspx.svn-base".
Access to the path
'C:\Code\SolutionName\ProjectName\obj\Debug\Package\PackageTmp\Views\ViewName.svn\text-base\ActionName.aspx.svn-base'
is denied.
Why is Subversion giving me trouble? How do I fix it?
I disabled the file indexing of my bin and obj folders. But, that didn't work.
I noticed that my folders were read-only. I changed that.
It worked! Publish succeeded.
I believe your issue is related to the default permissions assigned the to C: drive in windows 7 (and Vista).
Open explorer and find the c:\code folder
Right click on the c:\code folder
and select properties
select the security tab
select the user ID "Users"
In the permissions box, tick the
"modify" allow box
Select OK, OK until permision dialog
boxes close
That should resolve the permission issue
I had this same problem, and none of the previous solutions worked. What worked for me was to take the bin and obj folders out of repository. After doing that, I was able to publish.
The most likely cause is a permissions issue. The path in question may have been created while you were running with elevated permissions and hence requires admin permissions to delete. Try running Visual Studio as an admin and see if the problem goes away.
If so then the best solution is to do the following
Save the changes to that directory (check in if necessary)
Delete the repository
Re-check out the repository and ensure you are not running as an admin when doing so
I just deleted the existing folders at the publish destination which then allowed publishing to work. Un-setting read-only didn't seem to work. (Not sure why this started occurring).
What actually works is the solution that Zack Peterson gave? Thanks Zack!
I am writing an application that will automatically remove all of the .SVN folders and files during deployment. While doing so, I was getting the same error as described above.
Once I changed the folder to NOT be Read Only, I was able to delete files and folders programmatically.
My next step is to set the attribute programmatically on NOT Read Only so that I can accomplish the entire installation with the click of a button.
Oddly enough, I tried building an old project with Visual Studio 2010. It gave me the error that it failed due to my access being denied. I tried to remove the read-only off the directory and had no luck.
Although, when I opened it in Visual Studio 2015, it gave me the error that my certificate was expired.
Upon creating a new certificate and rebuilding - everything was fine.
For me, the windows service was running in the background. closing the service from the task manager and then rebuilding the project did the job for me.
If you are being denied access to any specific folder, then it is being used by some other application.Check if any other application is using that path to reference that folder of any file in that folder.
In my case , my application was reference a file inside the bin folder. So every time i publish and delete the old one. error will be thrown that bin folder can not be deleted. access denied.
i went in my application. checked in the refrenced path of each dll, removed the ones which referenced the publish path and BOOM
Issue solved.
My problem resolved after doing:
Close VS and Restart your machine.
Update all your softwares to latest stable versions at Manage Nuget package for solution
Run your test now.
Hope this helps.
Right click on the shortcut you start the IDE from and select properties. Click advanced and click'Run as Administrator'. Worked as charm for me.