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.
Related
I'm trying to reset my user settings for debugging purposes. I'm using the "Synchronize" button under the Settings area of the Project designer. When I do so, I get a message box with the following:
No user.config files were found in any of the following locations:
C:\Users\MyUserName\AppData\Roaming\MyCompanyName\Job_Dashboard.exe_Url_cxdbq4we0vujxxk3deh2qr2dq3i5kz5m\1.1._
C:\Users\MyUserName\AppData\Local\MyCompanyName\Job_Dashboard.exe_Url_cxdbq4we0vujxxk3deh2qr2dq3i5kz5m\1.1._
C:\Users\MyUserName\AppData\Roaming\MyCompanyName\Job_Dashboard.exe_Url_24oqbm3g45gfzsxxv5olluxp4sstx5rd\1.1._
C:\Users\MyUserName\AppData\Local\MyCompanyName\Job_Dashboard.exe_Url_24oqbm3g45gfzsxxv5olluxp4sstx5rd\1.1._
After some investigating, I determined without a doubt that my debug session user.config file is actually being saved at this location:
C:\Users\MyUserName\AppData\Local\MyCompanyName\Job_Dashboard.exe_Url_x1qpbuzhilhu1j1pt1g1iysdnoghdcey
This is the only folder under my AppData\Local\MyCompanyName folder, and there are NO folders under my AppData\Roaming\MyCompanyName folder. This folder also corresponds to and updates with any settings changes I make while debugging my application. So it's clearly the correct folder.
However, that folder has a completely different "Url" ID from either of the Local folders the Settings designer is looking for when doing a Synchronize... which explains why it can't find it.
Why is it looking for the wrong folder, and how do I correct this?
I found some threads recommending to delete my company folder under the AppData\Local folder, rebuild my project, and run it to re-create the settings folder. I did this, but it just re-creates it under the same Url, and Synchronize continues looking for the same incorrect Urls.
in InstallShield 2011, I cannot modify file permissions under Application Data -> Files and Folders. Whenever I right click on items, it shows grayed out menu buttons. I can't even delete existing entries.
In a bat script later in the installer, I can't copy over certain files because I don't have the right permissions so the installer fails when trying to reference files in BackupFiles. For some reason all the other files get copied over just fine; I can't modify those file's permissions either. I read online that you have to click the "Properties" button in that context menu to change permissions.
My version is InstallShield 2011 Premiere Edition Version 17.
I don't understand why this is grayed out. The source files do not have any restrictions on them so it must be the installer doing something related to permissions.
That boxy orange overlay on the folders and files indicates that these are coming from a Dynamic File Link. Because these files aren't actually added to your project, not all configuration options are available. You might have to edit the permissions on the source files (before build), or change your project to statically include all or some of these files. Given the size of that tree, changing it all to static could be a bit tedious. Changing parts of it (by editing the link exclusions) might be a good middle ground.
Or you could better determine what's going wrong and see if you can address it in the batch file. Assuming this is InstallScript (rather than InstallScript MSI), the entire setup along with any processes it launches should be elevated. So I'm having a hard time guessing what could go wrong. Perhaps a read-only flag? Perhaps use a tool like process monitor to get more information on that, and see if you can add a call to attrib -r, or cacls, or whatever.
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!
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!
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.