Folder permissions

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
11/22/2006 8:14:32 PM
Gravatar
Total Posts 41

Folder permissions

Hi!

Trying to setup a mojoportal for the first time at my webhotel. I have copied all the files and created the database tables (mysql). But when I'm trying to open the page in IE I get an Server Error in '/' Application. I have changed Web.config to <customErrors mode="off"/> but it still show the same non specific errorpage, not usefull at all.

I have searched the forums and found out that the data folder needs to have write permissions. Ok, before I contact the support for this, could this be changed to another folder? I have a folder named db which was automatic setup with the following permissions:

"db" is a special folder with special permissions for databases. db has iusr_ write but no script or read access it prevents anyone from downloading your database as iusr has no read or scripting rights.

Could this folder work instead? Is it possible to use it or do I need to contact support and ask them to change the permission?

11/23/2006 1:46:02 AM
Gravatar
Total Posts 18439

Re: Folder permissions

Hi,

sorry but no, the Data folder and all its children must be writable by the web process. This folder doesn't contain the db, it contains everything else that must be writable, like error log, search index, gallery images, skins, etc

Hope it helps,

Joe
11/24/2006 12:12:14 AM
Gravatar
Total Posts 41

Re: Folder permissions

Hi again!

The web support said they fixed the permission setting, but it still doesn't work. It's the same error message and I have tried to change the customErrors but it doesn't do anything.

So, where should I go from here?

11/24/2006 2:02:29 AM
Gravatar
Total Posts 18439

Re: Folder permissions

Hi,

If they correctly set the permission then there should be a log file at /Data/currentlog.config
Its just a text file, if you can look in there it may provide additional info about your error.
If the file doesn't exist it means they did not correctly set the permission because the web process will write that file if it can.
After a change to the permissions, you need the application to recycle. They may have a way to do that in the control panel for your hosting account. In mine there is a button to recycle the IIS Application pool.
If not you can recycle the app by downloading your web.config file, type a space or a new line in there, save it and upload it again. ASP.NET automatically recycles if the Web.config is modified.

Hope it helps,

Joe
11/27/2006 4:05:50 AM
Gravatar
Total Posts 41

Re: Folder permissions

Thanks for your help so far Joe. No results yet however.

Can you explain to me why the customErrors = off doesn't do anything. If I set it to off, shouldn't it display the error up front instead of writing it to the data folder?

I have been in contact with the webhost support twice now and it still doesn't work. Just in case I provided them with false information, could you post exactly what I should ask them to do?

11/27/2006 4:18:20 AM
Gravatar
Total Posts 18439

Re: Folder permissions

Are you using the latest version of mojoPortal? There was a bug in the global error handler in the previous version.

One thing that can cause customErrors= off to not work is if there is an error parsing the web.config file itself. It may also be possible that a setting in machine.config is not allowing you to turn this off.

There is full documentation about IIS setup here:
http://www.mojoportal.com/iiswebsetup.aspx

Note the part in the bottom half of the page has full details about the permissions needed on the Data folder and all its child objects. On Win 2003 Server its the IIS_WPG user account that needs this permission

Hope it helps,

Joe
11/28/2006 8:00:03 AM
Gravatar
Total Posts 41

Re: Folder permissions

Hi again!

Well, after sending your installation help to the web support they answered a bit annoyed (for the third time) that the permission is set correctly to the data folder.

To test that the custom "Errors = off" was working I made a new web.config with just this setting. And it did work, I recieved an error which is better than nothing:

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'mojoPortal.Web.Global'.

Source Error:

Line 1:  <%@ Application Codebehind="Global.asax.cs" Inherits="mojoPortal.Web.Global" %>

Well, I guess that this doesn't mean a crap since I just removed all your settings. But is the mojoPortal.Web.Global a file? If so it's not included in the release zip.

So, what's left to test? The only thing I have changed in the real web.config file is the conection string to the database. Will the log file in the data folder still be written if I have provided a wrong connection string?

I'm lost...

11/28/2006 8:07:20 AM
Gravatar
Total Posts 18439

Re: Folder permissions

Global is a class represented by Global.asax in the root of the web, its code is compiled into mojoPortal.Web.dll which should be in the bin folder beneath the root of the web.
Are you sure they have your site configured for 2.0 ASP.NET and not 1.1 ASP.NET?

Hope it helps,

Joe
11/28/2006 7:33:52 PM
Gravatar
Total Posts 41

Re: Folder permissions

OK, the files seems to be ok.

Yes, 2.0.50727 is installed.

11/30/2006 8:17:49 AM
Gravatar
Total Posts 41

Re: Folder permissions

Hi again!

Yes, mojo portal is working!

The 2.0 framework was not correctly installed.

www.douzette.se

I will let my mother do all the work on this page. So if she can handle this, everyone can .

Thanks for all your help Joe!

12/29/2006 12:28:45 AM
Gravatar
Total Posts 22

Re: Folder permissions

Hej Emil

 

I am using the same web host (web10) as you and wonder if you want to share you experience.

 My error is

In currentlog.config

2006-12-29 12:01:30,665 [2424] ERROR mojoPortal.Business.WebHelpers.CacheHelper [(null)] - Error trying to obtain siteSettings
System.Net.Sockets.SocketException: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied
   at System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
   at MySql.Data.Common.SocketStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.BufferedStream.ReadByte()
   at MySql.Data.MySqlClient.PacketReader.ReadHeader()
   at MySql.Data.MySqlClient.PacketReader.OpenPacket()
   at MySql.Data.MySqlClient.NativeDriver.Open()
   at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection()
   at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
   at MySql.Data.MySqlClient.MySqlPool.GetConnection()
   at MySql.Data.MySqlClient.MySqlPoolManager.GetConnection(MySqlConnectionString settings)
   at MySql.Data.MySqlClient.MySqlConnection.Open()
   at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters)
   at mojoPortal.Data.dbPortal.SiteSettings_GetDefaultPage(String HostName)
   at mojoPortal.Business.SiteSettings.GetSiteSettings(String hostName, Int32 pageIndex, Int32 pageID)
   at mojoPortal.Business.SiteSettings..ctor(String hostName, Int32 pageIndex, Int32 pageID)
   at mojoPortal.Business.WebHelpers.CacheHelper.LoadSiteSettings()

12/29/2006 12:55:17 AM
Gravatar
Total Posts 22

Re: Folder permissions

Hej Emil
I am using the same web host (web10) as you and wonder if you want to share you experience.


currentlog.config says

System.Net.Sockets.SocketException: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied
at System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
at MySql.Data.Common.SocketStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.BufferedStream.ReadByte()
at MySql.Data.MySqlClient.PacketReader.ReadHeader()
at MySql.Data.MySqlClient.PacketReader.OpenPacket()
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlPoolManager.GetConnection(MySqlConnectionString settings)
at MySql.Data.MySqlClient.MySqlConnection.Open()


12/29/2006 1:25:21 AM
Gravatar
Total Posts 22

Re: Folder permissions

Hej
It was the server setting that was faulty. Should not be localhost but webhotel.mysql.net.


Time to build a web site

/Tommy
You must sign in to post in the forums. This thread is closed to new posts.