Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Accessing the only folder stored on server

Reply
Thread Tools

Accessing the only folder stored on server

 
 
snehapshinde@gmail.com
Guest
Posts: n/a
 
      08-29-2008
I am developing a system in jsp wherein the each client has its own
folder on the server.
I want to provide a facility to user where he can open only his folder
and add/delete files over there. It is similar to how we open files in
on a PC, the only difference is that the user should browse through
only his folder (which is on the server) and not others.
How can I do it? Plz help !
 
Reply With Quote
 
 
 
 
GArlington
Guest
Posts: n/a
 
      08-29-2008
On Aug 29, 10:07*am, (E-Mail Removed) wrote:
> I am developing a system in jsp wherein the each client has its own
> folder on the server.

Good, so if you have dir structure like /clientsDirs/clientDir[N] and
set /clientsDirs/clientDir[N]/ to be their ROOT dir it should solve
your requirements...
> I want to provide a facility to user where he can open only his folder
> and add/delete files over there. It is similar to how we open files in
> on a PC, the only difference is that the user should browse through
> only his folder (which is on the server) and not others.

It is in fact closer to the way ftp server works, you define ROOT dir
for each client and each client has access to their ROOT subdirs and
can NEVER get bellow their ROOT dir...
So, in your implementation all you have to do is to make sure that the
client has NO WAY of going bellow their ROOT dir...
> How can I do it? Plz help !


 
Reply With Quote
 
 
 
 
snehapshinde@gmail.com
Guest
Posts: n/a
 
      08-30-2008
On Aug 29, 3:48*pm, GArlington <(E-Mail Removed)> wrote:
> On Aug 29, 10:07*am, (E-Mail Removed) wrote:> I am developing a system in jsp wherein the each client has its own
> > folder on the server.

>
> Good, so if you have dir structure like /clientsDirs/clientDir[N] and
> set /clientsDirs/clientDir[N]/ to be their ROOT dir it should solve
> your requirements...> I want to provide a facility to user where he can open only his folder
> > and add/delete files over there. It is similar to how we open files in
> > on a PC, the only difference is that the user should browse through
> > only his folder (which is on the server) and not others.

>
> It is in fact closer to the way ftp server works, you define ROOT dir
> for each client and each client has access to their ROOT subdirs and
> can NEVER get bellow their ROOT dir...
> So, in your implementation all you have to do is to make sure that the
> client has NO WAY of going bellow their ROOT dir...
>
>
>
> > How can I do it? Plz help !- Hide quoted text -

>
> - Show quoted text -


Could you please tell me the details of working of FTP server so that
I can incorporate it in my application or at least some references..
 
Reply With Quote
 
GArlington
Guest
Posts: n/a
 
      09-01-2008
On Aug 30, 6:13*am, (E-Mail Removed) wrote:
> On Aug 29, 3:48*pm, GArlington <(E-Mail Removed)> wrote:
>
>
>
> > On Aug 29, 10:07*am, (E-Mail Removed) wrote:> I am developing a system in jsp wherein the each client has its own
> > > folder on the server.

>
> > Good, so if you have dir structure like /clientsDirs/clientDir[N] and
> > set /clientsDirs/clientDir[N]/ to be their ROOT dir it should solve
> > your requirements...> I want to provide a facility to user where he can open only his folder
> > > and add/delete files over there. It is similar to how we open files in
> > > on a PC, the only difference is that the user should browse through
> > > only his folder (which is on the server) and not others.

>
> > It is in fact closer to the way ftp server works, you define ROOT dir
> > for each client and each client has access to their ROOT subdirs and
> > can NEVER get bellow their ROOT dir...
> > So, in your implementation all you have to do is to make sure that the
> > client has NO WAY of going bellow their ROOT dir...

>
> > > How can I do it? Plz help !- Hide quoted text -

>
> > - Show quoted text -

>
> Could you please tell me the details of working of FTP server so that
> I can incorporate it in my application or at least some references..


Google "java ftp server" there are lots of examples...

Generally, you should implement the concept of "virtual root" - the
lowest level directory - the commands cd,ls and other file access
commands should treat this directory's parent to be this directory...
I.e. command cd ../../../../ when executed in this [root] directory
should get you to parent of parent of parent of parent of current
directory -> see previous statement -> equals current [root]
directory... You ONLY have to implement this rule for your [virtual]
file system...
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
accessing folder on remote server from asp.net page (impersonation question) davidalan@gmail.com ASP .Net 0 08-02-2007 04:31 PM
Database file and folder are not read only but error message says it is read only?? keithb ASP .Net 2 06-07-2006 03:40 PM
SP 2 what folder is it stored in David Wells Computer Information 2 10-26-2004 05:52 PM
For share a folder in the network , but the folder only allow by password holder MCSE 55 04-14-2004 11:56 PM
help: setting web folder as application folder in server THY ASP .Net 3 10-16-2003 01:18 AM



Advertisments