Permissions

Topics: General, Troubleshooting
Jul 7, 2011 at 4:37 PM

Hello,

Ok, this is very unusual... I have had this happen several times. After installing Orchard (1.2xxx) and configuring permissions on the Module & Themes foldrs. I then run the application for awhile, downloading & installing various Modules and Themes. For some reason or another, after a while, I get the error that my permissions are not correct for Modules and Themes and it no longer allows me to Install them. Any ideas?

Regards

Coordinator
Jul 7, 2011 at 6:50 PM

Weird. Can you recycle the app domain and see if that still happens?

Jul 7, 2011 at 7:27 PM
Edited Jul 7, 2011 at 7:27 PM

By recycle, you mean restart in IIS? I have done this and also restarted IIS and the server itself....

Coordinator
Jul 7, 2011 at 7:37 PM

yes.

Jul 7, 2011 at 11:18 PM

yea, i've done that already and same thing... Still getting error page even though I have that permission set. Network Service is the entity Im using...

Coordinator
Jul 7, 2011 at 11:24 PM

This error message is sometimes misleading. Can you give the exact error message displayed in the notification area? Also, if possible, the corresponding error from the log file (in ~/App_Data/Logs).

Jul 11, 2011 at 3:33 PM

Here is the error in the page:

Package installation failed.
There was an error installing the requested package. This can happen if the server does not have write access to the '~/Modules' or '~/Themes' folder of the web site. If the site is running in shared hosted environement, adding write access to these folders sometimes needs to be done manually through the Hoster control panel. Once Themes and Modules have been installed, it is recommended to remove write access to these folders.
Input string was not in a correct format.
And here is the log:
2011-07-06 14:51:17,015 [52] Orchard.Packaging.Controllers.PackagingServicesController - Package installation failed.
Orchard.OrchardException: There was an error installing the requested package. This can happen if the server does not have write access to the '~/Modules' or '~/Themes' folder of the web site. If the site is running in shared hosted environement, adding write access to these folders sometimes needs to be done manually through the Hoster control panel. Once Themes and Modules have been installed, it is recommended to remove write access to these folders. ---> System.FormatException: Input string was not in a correct format.
   at System.Version.VersionResult.SetFailure(ParseFailureKind failure, String argument)
   at System.Version.TryParseComponent(String component, String componentName, VersionResult& result, Int32& parsedComponent)
   at System.Version.TryParseVersion(String version, VersionResult& result)
   at System.Version.Parse(String input)
   at Orchard.Packaging.Services.ExtensionReferenceRepository.<GetPackages>b__4(<>f__AnonymousType2`2 <>h__TransparentIdentifier0)
   at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x)
   at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at NuGet.PackageRepositoryExtensions.FindPackage(IPackageRepository repository, String packageId, Version version)
   at NuGet.PackageRepositoryExtensions.FindPackage(IPackageRepository repository, String packageId)
   at NuGet.ProjectInstallWalker.OnBeforeDependencyWalk(IPackage package)
   at NuGet.PackageWalker.Walk(IPackage package)
   at NuGet.InstallWalker.ResolveOperations(IPackage package)
   at NuGet.ProjectManager.Execute(IPackage package, IPackageOperationResolver resolver)
   at NuGet.ProjectManager.AddPackageReference(IPackage package, Boolean ignoreDependencies)
   at NuGet.ProjectManager.AddPackageReference(String packageId, Version version, Boolean ignoreDependencies)
   at NuGet.ProjectManager.AddPackageReference(String packageId, Version version)
   at Orchard.Packaging.Services.PackageInstaller.ExecuteInstall(IPackage package, IPackageRepository packageRepository, String sourceLocation, String targetPath)
   at Orchard.Packaging.Services.PackageInstaller.InstallPackage(IPackage package, IPackageRepository packageRepository, String location, String applicationPath)
   at Orchard.Packaging.Services.PackageInstaller.Install(String packageId, String version, String location, String applicationPath)
   at Orchard.Packaging.Services.PackageManager.<>c__DisplayClass8.<Install>b__7()
   at Orchard.Packaging.Services.PackageManager.DoInstall(Func`1 installer)
   --- End of inner exception stack trace ---
   at Orchard.Packaging.Services.PackageManager.DoInstall(Func`1 installer)
   at Orchard.Packaging.Services.PackageManager.Install(String packageId, String version, String location, String applicationPath)
   at Orchard.Packaging.Controllers.PackagingServicesController.InstallGallery(String packageId, String version, Int32 sourceId, String redirectUrl)
Jul 12, 2011 at 4:11 PM

Any ideas?

Coordinator
Jul 12, 2011 at 7:20 PM

Is this happening on every request once you get into that situation? If not, please describe exactly what you were doing when you got the error. Can you also give the complete list of all the modules and themes you installed?

Jul 12, 2011 at 9:22 PM
Edited Jul 13, 2011 at 2:14 AM

Yes, like I said previously, after setting the permissions, I was able to install about 5 modules and about 4 themes, then all of a sudden I get the permission error.... every time now....

I am hosted in a shared environment which I support myself. Running on Windows Server 2008 R2 using WebSitePanel as my provisioning software... Never had a problem before with permissions....

I have installed the following modules:

Code Generation
Messaging
Email
Localization
DesignerTools
DateTimeField
FileField
VersionManager
Favicon
CulturePicker
LayoutSelector
VandelayClassy
oForms

I have installed the following themes:

contoso
Fizz
Terra
Dark
TheThemeMachineStrikeBack

Regards...

Coordinator
Jul 13, 2011 at 9:56 PM

The error message is misleading here: I don't think this is a problem with permissions at all. Can you try to disable those modules and themes one by one (by renaming the module.txt or theme.txt to something else) until the site is back online?

Jul 14, 2011 at 6:23 PM

k, i just started over and everything is working fine....

Oct 5, 2011 at 1:25 AM

I had exactly the same problem on Orchard 1.3.9 on Windows Server 2008 R2 64bit.

The installation went smooth, I installed a few themes and then suddenly I got this same Package installation failed error when I tried to add one more theme. The same error came also when I tried to install some module.

From the Orchard log:
====================
2011-10-05 00:59:00,950 [43] Orchard.Packaging.Controllers.PackagingServicesController - Package installation failed.
Orchard.OrchardException: There was an error installing the requested package. This can happen if the server does not have write access to the '~/Modules' or '~/Themes' folder of the web site. If the site is running in shared hosted environement, adding write access to these folders sometimes needs to be done manually through the Hoster control panel. Once Themes and Modules have been installed, it is recommended to remove write access to these folders. ---> System.FormatException: Input string was not in a correct format.
   at System.Version.TryParseComponent(String component, String componentName, VersionResult& result, Int32& parsedComponent)
   at System.Version.TryParseVersion(String version, VersionResult& result)
   at System.Version.Parse(String input)
   at Orchard.Packaging.Services.ExtensionReferenceRepository.<GetPackages>b__4(<>f__AnonymousType3`2 <>h__TransparentIdentifier0)
   at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at NuGet.PackageRepositoryExtensions.FindPackage(IPackageRepository repository, String packageId, Version version)
   at NuGet.PackageRepositoryExtensions.FindPackage(IPackageRepository repository, String packageId)
   at NuGet.ProjectInstallWalker.OnBeforeDependencyWalk(IPackage package)
   at NuGet.PackageWalker.Walk(IPackage package)
   at NuGet.InstallWalker.ResolveOperations(IPackage package)
   at NuGet.ProjectManager.Execute(IPackage package, IPackageOperationResolver resolver)
   at NuGet.ProjectManager.AddPackageReference(IPackage package, Boolean ignoreDependencies)
   at NuGet.ProjectManager.AddPackageReference(String packageId, Version version, Boolean ignoreDependencies)
   at NuGet.ProjectManager.AddPackageReference(String packageId, Version version)
   at Orchard.Packaging.Services.PackageInstaller.ExecuteInstall(IPackage package, IPackageRepository packageRepository, String sourceLocation, String targetPath)
   at Orchard.Packaging.Services.PackageInstaller.InstallPackage(IPackage package, IPackageRepository packageRepository, String location, String applicationPath)
   at Orchard.Packaging.Services.PackageManager.<>c__DisplayClass8.<Install>b__7()
   at Orchard.Packaging.Services.PackageManager.DoInstall(Func`1 installer)
   --- End of inner exception stack trace ---
   at Orchard.Packaging.Services.PackageManager.DoInstall(Func`1 installer)
   at Orchard.Packaging.Controllers.PackagingServicesController.InstallGallery(String packageId, String version, Int32 sourceId, String redirectUrl)
====================

No amount of security settings changes or restarts would fix the problem.

Then I started renaming the theme.txt files as bertrandleroy suggested. When I renamed the theme.txt file for the "TheThemeMachineStrikesBack" theme, I suddenly could install both new themes and modules without problems.

So it seems we have two problems; some incorrect Orchard handling or reporting of install errors and some problem with the theme "TheThemeMachineStrikesBack".

Coordinator
Oct 5, 2011 at 3:41 AM

Interesting.

Nov 18, 2011 at 8:05 PM

I had this error. It was something about the theme.txt file from a custom Theme that I made. Version was set to "1" so I changed it to "1.0" and everything worked fine.

Mar 2, 2012 at 3:15 PM
Edited Mar 2, 2012 at 3:21 PM

i had the same problem, noticed that I had one module in common with xotj123. uninstalled TheThemeMachineStrikeBack and its all good now. the theme file for TheThemeMachineStrikeBack must be broken... just noticed finnurhj said the same thing, nevermind...

Mar 12, 2012 at 12:08 AM

I have the same error with version 1.4. nothing appear in the log. I also set write permission to IUSER to the whole folder and sub-folders (not only Themes and Modules folder). I'm running Orchard on local IIS7 (anonymous access is enabled and assigned to IUSER).

any clue ?

Mar 12, 2012 at 12:56 PM

I have a new copy of the 1.4 source running on Windows 7 inside VS 2010 as an administrator using the development server (or IIS 7 Express) and I get this error when trying to install any module:

"Package installation failed: There was an error installing the requested package. This can happen if the server does not have write access to the '~/Modules' or '~/Themes' folder of the web site. If the site is running in shared hosted environement, adding write access to these folders sometimes needs to be done manually through the Hoster control panel. Once Themes and Modules have been installed, it is recommended to remove write access to these folders."

The previous version 1.3 ran fine in this configuration.  Can anybody help?

Coordinator
Mar 13, 2012 at 12:18 AM

Try to change the address of the gallery feed to http://packages.orchardproject.net/FeedService.svc/

Mar 13, 2012 at 9:15 PM

I'm having the same issue using v1.4, Windows 7 (x86) and IIS 7.5. All accounts have access to the Orchard files and I have tried updating the feed to the link Betrand posted here. Is anyone else experiencing this?

Mar 14, 2012 at 8:51 PM

This is working for me now using the link Bertrand provided. I'm not sure why it didn't work right away, but it's good now.

Mar 18, 2012 at 3:56 PM

I've just installed ver. 1.4 but if I try to install a module I get the previous error! I've tried Bertrand url in "DefaultPackagingUpdater.cs" and GalleryServer WebserviceReference without luck!

Can someone help me? 

Mar 18, 2012 at 6:40 PM

go to the administration dashboard, then settings > Gallery, put the url : http://packages.orchardproject.net/FeedService.svc/ and delete the old one.

Mar 19, 2012 at 11:38 AM

Question : can this issue above for gallery can be resolve? Is it hard to perform this? How long will this take? Any idea anyone?

Mar 19, 2012 at 11:49 AM

It is fixed in changeset 4087e8604d7e, so it will be OK in 1.4.1. Until then, you just have to delete the old address and a the new one.

Mar 19, 2012 at 12:19 PM

thanks. So this should be fairly quick?

Mar 23, 2012 at 1:50 AM

This worked for me: Try to change the address of the gallery feed to http://packages.orchardproject.net/FeedService.svc/

Apr 17, 2012 at 8:19 PM

When I am trying to install Themes, I am having the same problem and fixing the URL to goto http://packages.orchardproject.net/FeedService.svc/ fixes it when running the website through WebMatrix; however, once I deploy the website to my local IIS server, the error returns and I cannot get past it.

All users have full control over the entire folder structure.  This is a very frustrating problem.

 

You can work around it by manually downloading the Theme, renaming the nuget package to a .zip file and then extracting the Theme out into your directory. This is a really crappy work around.

 

If anyone else has figured this out please let me know.

Coordinator
Apr 17, 2012 at 10:20 PM

Did you also set-up the feed URL on your target server? I'm not sure I understand what you are doing. Do you mean that you installed a module on your local dev machine and that once you deployed (including that module), the module stopped working? Or that installing modules from your production environment doesn't work?

Apr 18, 2012 at 2:14 PM

Hi Bertrand,

This is what I am trying to do.

I created a new orchard project from scratch within the confines of Web Matrix. I then downloaded and installed a new theme. I closed down web matrix and wanted to run this using the IIS 7 on my Windows 7 machine.  I created a new virtual application in IIS on my local machine; pointed it to the orchard site on my computer and went to run it. 

The site came up just fine and I went to download a different theme and that's when I received the error:

"Package installation failed: There was an error installing the requested package. This can happen if the server does not have write access to the '~/Modules' or '~/Themes' folder of the web site. If the site is running in shared hosted environement, adding write access to these folders sometimes needs to be done manually through the Hoster control panel. Once Themes and Modules have been installed, it is recommended to remove write access to these folders."

The URL for the gallery is using the new URL;   All Users have FULL permission from what I can tell from windows explorer.  

I then went and repeated the steps above on a Windows 2008 Server and did not have the problem.  I created a virtual application; copied the Orchard website over to it and was able to install themes with no problem.  So, right now it seems like its isolated to local IIS perhaps?

Apr 18, 2012 at 2:59 PM

So I just fixed the problem with my local IIS:

 

  1. Go to Programs & Features
  2. Click on Turn Windows Features on or off
  3. Click on Internet Information Services
  4. Now, I went through and turned on everything for Web Management Tools and World Wide Web Services because I was missing several items. I didn't have time to try this one at a time to figure out what one actually did it; but after turning these on; the error had finally went away and I could install themes.

I did this in addition to:

  1. Updating the gallery URL to be http://packages.orchardproject.net/FeedService.svc/ 
  2. Granting everyone full permissions to the directory

Hopefully this will help in the future for anyone else facing this error.  If anyone has a chance to pin point down what exact options should be selected in the World Wide Web Services that would be good!


Thanks,

Flea

Apr 28, 2012 at 12:26 PM

Hi Flea,

I am also having the same problem. Can you or anyone on the board advise. I'm completely new to this so do not know what an IIS is or how to find it.

Can someone provide some straightforward guidance so I can solve this problem for myself. I downloaded wordpress for windows and am using microsoft webmatrix on windows XP. I went to the web gallery in this program and installed orchard.

sola

Coordinator
Apr 28, 2012 at 5:04 PM

Go to /Admin, settings, gallery and change the feed address to  http://packages.orchardproject.net/FeedService.svc/ 

Apr 28, 2012 at 5:51 PM

Hi bertandleroy,

It did the trick! Many thanks for such a simple solution.

sola.