OrchardCMS / Orchard

Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
https://orchardproject.net
BSD 3-Clause "New" or "Revised" License
2.38k stars 1.12k forks source link

Mappings.bin ... Access is denied #1903

Open orchardbot opened 13 years ago

orchardbot commented 13 years ago

thecrmsolutions created: https://orchard.codeplex.com/workitem/18076

Hi,

I changed the folder of my Orchard Website and now getting this error:

Access to the path 'C:\HostingSpaces\wwwroot\App_Data\Sites\Default\mappings.bin' is denied.

Any clue on this?

Regards TGB

orchardbot commented 13 years ago

teelahti commented:

I had lots of similar problems when copying my site to my hoster. I ensured that all users had full ACL's to the files but still I got "access denied". I was not able to find the root cause and thus did not create a bug, but still I think there is something wrong with file locking in Orchard.

orchardbot commented 13 years ago

jnewkirk commented:

I am having the same problem. Any ideas?

orchardbot commented 13 years ago

@bleroy commented:

You changed the folder of the site. Is this path pointing to the old one or the new one?

orchardbot commented 13 years ago

@bleroy commented:

Can one of you provide repro steps?

orchardbot commented 12 years ago

marcusalmgren commented:

I had planned to upgrade from v.1.2.41 to 1.3.9 and thought that a good start would be to copy the site to a new folder and point IIS to the newly copied folder while upgrading. I copied the site folder using Windows Explorer and edited the path in IIS. That's when I got the "Access to the path '{path}\mappings.bin' is denied" error. I made sure the app pool identity had the same permissions but still no luck. I then opened up PowerShell and ran Get-Acl {oldpath} | Set-Acl -path {newpath} but still no luck. Out of desperation I gave Everyone Full Control which seemed to resolve the error on mappings.bin, but then I got "Access to the database file is not allowed. [ 1884,File name = {path}\Orchard.sdf,SeCreateFile ]". True to the game I gave Everyone Full Control to the database file, but that didn't do the trick. Needless to say, I won't be upgrading...

orchardbot commented 12 years ago

@bleroy commented:

Try to delete the mappings file and restart IIS. It should be recreated.

orchardbot commented 12 years ago

marcusalmgren commented:

Then I get the "Access to the database file is not allowed. [ 1884,File name = {path}\Orchard.sdf,SeCreateFile ]".

orchardbot commented 12 years ago

TheMonarch commented:

This was happening to me today. A reboot and rehydrate of the site seems to have fixed it. Also running setup from the web interface rather than command line was part of the steps I took before it started working, but not sure if that part is a coincidence.

orchardbot commented 12 years ago

andress commented:

I just had the same problem. I moved to a new laptop (keeping as much as possible the paths, but the root changed from C to D). Got the error.

Looking at the file, I saw it was marked as R/O. Just this file. All other files on the folder were R/W so I assumed it's supposed to be like that. I tried it all, setting security audits, giving access to everyone and their uncle. Nothing.

Betrand's comment that it should be recreated made me decide to test. Removed the R/O flag and listo. Done. Working.

Back to work now.