aspose file tools*
The moose likes JForum and the fly likes Solution to Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Solution to "Please give write access for the user..." error in 2.1.7" Watch "Solution to "Please give write access for the user..." error in 2.1.7" New topic
Author

Solution to "Please give write access for the user..." error in 2.1.7

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
This is actually an expanded restatement of andowson 's posting on his Linux install and solution . Since this is a general problem, not related to OS, etc., I'm converting it into a more general answer.

It appears that a required file, __index.redirect, has been left out of the current 2.1.7 install zip file. This is required to do a fresh install but not an upgrade. So, if you are doing a fresh jForum install, this will result in a message similar to:



The solution is to place the attached file in your web application's root directory (e.g. webapps/jforum). This should satisfy the installers checks for write access.

If you still get the error message. Then you have a directory and file rights issue. Fixing this depends on your OS.

With *nix, you will have to give the user id which your application server is running read/write (+wr) permission to the jforum webapp directory. IMHO, the safest way to do this is to use on of the following commands:

chown <appserver-user> /<path to>/webapp/jforum -R

or

chgrp <appserver-user-group> /<path to>/webapp/jforum -R

In Windoze, you will need to determine what user the the app server service is running under in the Services Control Panel applet. Then you will need to change the directory security settings via the directory properties (e.g., File Explorer, Right click on jforum directory, properties, security tab).

Hopefully, this will solve a lot of people's problems.

Greg
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
That direct file seems to still direct me to the forum pages instead of the installation page.

Jeff

[originally posted on jforum.net by netbracketsJeff]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
By this, I guess you mean that you're trying to install with the older instructions?

I think they said to just go to http://server/jforum. Then the index.htm delivered with the install zip would take you to the install server.

The install instructions for 2.1.7 ( http://www.jforum.net/install.jsp ) say to go to:

http://server/jforum/install.jsp

This will start the install servlet.
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I tried that too, but I get a 404 error:

type Status report

message /install.jsp

description The requested resource (/install.jsp) is not available.
[originally posted on jforum.net by netbracketsJeff]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I started from scratch and now it works!

Thanks, this looks like a GREAT tool and just what I'm looking for.


[originally posted on jforum.net by netbracketsJeff]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
You added the missing file with the wrong name. It should be __index.redirect not __index.redirect.html.

FWIW, that message only occures if one of two conditions are not met:

1) __index.redirect must be writable (and exist)

2) the WEB_INF/config/modulesMapping.properties must be writable

But the install and attachments will fail if some other files/directories are r/o as well. Just with different messages.
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Sorry to be a pain, but now I can't get past the write access error. I've both given all files and subdirectories under, and including jforum 777 permission, and changed the user to the appserver user, but I still get the error. e.g. Here's what my jforum dir looks like now:

-rwxrwxrwx 1 appserve netBrack 137 Nov 12 17:53 ChangeLog.htm
-rwxrwxrwx 1 appserve netBrack 131 Nov 12 17:52 Documentation.htm
-rwxrwxrwx 1 appserve netBrack 134 Nov 12 17:52 How to Install.htm
-rwxrwxrwx 1 appserve netBrack 1612 Nov 12 17:54 License.txt
drwxrwxrwx 3 appserve netBrack 102 Feb 11 12:19 META-INF
-rwxrwxrwx 1 appserve netBrack 79 Dec 6 01:37 SourceCode.txt
drwxrwxrwx 8 appserve netBrack 272 Dec 9 00:24 WEB-INF
-rwxrwxrwx 1 appserve netBrack 564 Feb 13 13:17 __index.redirect.html
drwxrwxrwx 5 appserve netBrack 170 Nov 15 13:49 images
-rwxrwxrwx 1 appserve netBrack 564 Nov 12 18:01 index.htm
-rwxrwxrwx 1 appserve netBrack 72 Nov 12 19:13 install.jsp
-rwxrwxrwx 1 appserve netBrack 7774 Feb 8 02:54 latest_version.txt
drwxrwxrwx 8 appserve netBrack 272 Dec 10 18:47 templates
drwxrwxrwx 3 appserve netBrack 102 Nov 15 13:22 tmp
drwxrwxrwx 8 appserve netBrack 272 Nov 15 13:22 upgrade
drwxrwxrwx 5 appserve netBrack 170 Nov 15 13:22 upload

any ideas?

Thanks
[originally posted on jforum.net by netbracketsJeff]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Doh! How the heck did that happen?!? Anyway, THANKS for the help.

Jeff
[originally posted on jforum.net by netbracketsJeff]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Great! - That sortet the problems I was experiencing.

Quite a unfortunate error in the release.
[originally posted on jforum.net by krl]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
according to the solution, i modify the directory and files access write, but the install process has yet failed. why? i use tomcat+mysql configuration.
[originally posted on jforum.net by kuyon]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Dropping in the _index.redirect file also cured the problems I was seeing with doing a new install (my upgrade worked just fine). Then run to http://YOUR_SERVER_NAME:PORT/jforum/installer.jsp to start the installer.

I didn't have to repermission the directories or files either, which the installer was complaining about before using the _index.redirect file.

You should change the jforum directory owner to app server user (i.e. tomcat) so that it has the correct file permissions.
[originally posted on jforum.net by GatorBait3]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
This solution worked wonderfully for me with my Fedora Core 5 / Tomcat 5.5.23 / jforum 2.1.7-b3.zip setup. Why has the official package file not been updated to include this file??
[originally posted on jforum.net by kennethburgener]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I installed jforum on XP system.My solution is:

1.create a file named __index.redirect on the direcotry "jform"

2.the content of the file is :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" <br /> "http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>JForum </title>
</head>
<body>
<script type="text/javascript">
document.location = "forums/list.page";
</script>
</body>
</html>

!!!
[originally posted on jforum.net by acrbb]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Thanks!!! Solved the issue in one minute thanks to your post.

Really appreciate it.


[originally posted on jforum.net by wcannon]
 
wood burning stoves
 
subject: Solution to "Please give write access for the user..." error in 2.1.7