Accessing the only folder stored on server

Discussion in 'Java' started by snehapshinde@gmail.com, Aug 29, 2008.

  1. Guest

    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 !
     
    , Aug 29, 2008
    #1
    1. Advertising

  2. GArlington Guest

    On Aug 29, 10:07 am, 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 !
     
    GArlington, Aug 29, 2008
    #2
    1. Advertising

  3. Guest

    On Aug 29, 3:48 pm, GArlington <> wrote:
    > On Aug 29, 10:07 am, 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..
     
    , Aug 30, 2008
    #3
  4. GArlington Guest

    On Aug 30, 6:13 am, wrote:
    > On Aug 29, 3:48 pm, GArlington <> wrote:
    >
    >
    >
    > > On Aug 29, 10:07 am, 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...
     
    GArlington, Sep 1, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. THY
    Replies:
    3
    Views:
    2,935
    Alvin Bruney
    Oct 16, 2003
  2. William LaMartin

    _vti_cnf folder in the bin folder-- a problem?

    William LaMartin, Nov 10, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,700
    Oliver
    Nov 10, 2003
  3. keithb
    Replies:
    2
    Views:
    8,020
    keithb
    Jun 7, 2006
  4. Replies:
    0
    Views:
    490
  5. Jayson Williams
    Replies:
    2
    Views:
    86
    John Joyce
    Nov 13, 2007
Loading...

Share This Page