Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-13-2009, 04:20 AM
Member
 
Join Date: Jan 2009
Posts: 1
Rep Power: 0
mkohan is on a distinguished road
Default forbidden access to directory
Hi ,

I installed Apache 2.2 + Tomcat 5 + SSL on Linux and they run perfect.
The Java web application gives users(after they login) ability to upload files(pdf,ppt..) then creates a record for them, right way users can see their records and can open the documents that they uploaded.
The problem is when they click on the link to open the files that they uploaded before they get a "forbidden" screen.

The Java program save upload files on the APache/htdocs directory.
To solve that I have to run following command for the htdocs directory.
chmod 755 the_name_document.

After that the users can access their files.

The uploaded files could be accessible right away.
How can I solve this problem?

Thanks,
MK
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 01-13-2009, 06:49 PM
Steve11235's Avatar
Senior Member
 
Join Date: Dec 2008
Posts: 964
Rep Power: 2
Steve11235 is on a distinguished road
Default
Look at File.setReadable(). This allows you to set authority to read only.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
root directory raghu9198 New To Java 19 01-06-2009 04:11 AM
Method access or field access carderne New To Java 2 12-06-2008 07:20 PM
Traversing a directory Java Tip Java Tips 0 01-14-2008 10:33 AM
Help with access a database using Microsoft Access cachi Database 1 08-07-2007 08:51 AM
How can i get current directory? Ashley New To Java 1 05-26-2007 02:21 PM


All times are GMT +2. The time now is 07:01 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org