Accessing the only folder stored on server

S

snehapshinde

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 !
 
G

GArlington

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...
 
S

snehapshinde

On Aug 29, 10:07 am, (e-mail address 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..
 
G

GArlington

On Aug 29, 10:07 am, (e-mail address removed) wrote:> I am developing a system in jsp wherein the each client has its own
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...
- 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..[/QUOTE]

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...
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top