Re: Mapped File Access Problems in Servlets

2007-08-24 Thread Daniel L. Gross
I am not running in a domain, my servers are running in a workgroup 
only, and the machine tomcat 5.5 is running on is logged into an 
administrator account.  It appears that it sees the mapped drives 
because if I try to access a file that is not available, I get the 
proper JAVA message.  When I try to access an existing file, I get a 
java.io.FileNotFoundException filename (Access is Denied). 

The same user and password exists on the other machine which is why I 
can map the drive.  I tried a simple experiment and wrote a 5 line JAVA 
program and this accessed the drive just fine, but when I put those 5 
lines in the servlet, I got the access denied.


How do I change the configuration in the tomcat service to allow it to 
see other computers?


Thanks, Dan Gross, ATLC


Mark Thomas wrote:


Daniel L. Gross wrote:
 


I have a servlet that does a direct read from a mapped drive in
Windows.  It works fine in tomcat as long as I use a drive on the local
machine.  However, I need to access a mapped drive on a different
machine.  When I run the program, I get a FileNotFound error in JAVA and
(access denied) next to it.  Is there some permissions that need to be
set so my servlet can access a file on another machine.  And how do I
set this in Tomcat/JAVA.

Thanks,  Dan Gross ATLC
   



This comes down to the Windows user Tomcat is running as. You need to
make sure that that user has the necessary access to the network drives.

If you are running as a service, the default user for services has
zero privs on other machines. Usually what is required is to configure
the service to log on as a domain user that has the necessary access.

HTH,

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 



Re: Mapped File Access Problems in Servlets

2007-08-24 Thread Daniel L. Gross
I just tried changing the login configuration to log onto the 
administrator account, and I still get access denied.  Any thoughts???


Thanks, Dan Gross, ATLC


Mark Thomas wrote:


Daniel L. Gross wrote:
 


I have a servlet that does a direct read from a mapped drive in
Windows.  It works fine in tomcat as long as I use a drive on the local
machine.  However, I need to access a mapped drive on a different
machine.  When I run the program, I get a FileNotFound error in JAVA and
(access denied) next to it.  Is there some permissions that need to be
set so my servlet can access a file on another machine.  And how do I
set this in Tomcat/JAVA.

Thanks,  Dan Gross ATLC
   



This comes down to the Windows user Tomcat is running as. You need to
make sure that that user has the necessary access to the network drives.

If you are running as a service, the default user for services has
zero privs on other machines. Usually what is required is to configure
the service to log on as a domain user that has the necessary access.

HTH,

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 



Re: Mapped File Access Problems in Servlets

2007-08-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Daniel,

Daniel L. Gross wrote:
 How do I change the configuration in the tomcat service to allow it to
 see other computers?

You don't change the service configuration (unless you run Tomcat as
some other user -- which isn't a bad idea). Instead, you give the
requisite privileges to the effective user account under which Tomcat runs.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGztPl9CaO5/Lv0PARAoqjAKCvvwoZuk5T7W91CEMYjGszNQpSjQCgjpFS
pPWX0gtxSYA9Q6tdQv34ysc=
=Nzc+
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mapped File Access Problems in Servlets

2007-08-24 Thread Daniel L. Gross
Thanks for all your help, I found out the problem.  It was the service 
privilege running under the local machine.  The default tomcat icon at 
the bottom of the screen that allows you to configure and start/stop 
tomcat would not let me change the user it ran under.  However, I was 
able to change the user to Administrator under the windows services 
window and I can start and stop tomcat there as well.


Again, thanks for your quick responses, got me out of a tight Jam.

Dan Gross, ATLC


Mark Thomas wrote:


Daniel L. Gross wrote:
 


I have a servlet that does a direct read from a mapped drive in
Windows.  It works fine in tomcat as long as I use a drive on the local
machine.  However, I need to access a mapped drive on a different
machine.  When I run the program, I get a FileNotFound error in JAVA and
(access denied) next to it.  Is there some permissions that need to be
set so my servlet can access a file on another machine.  And how do I
set this in Tomcat/JAVA.

Thanks,  Dan Gross ATLC
   



This comes down to the Windows user Tomcat is running as. You need to
make sure that that user has the necessary access to the network drives.

If you are running as a service, the default user for services has
zero privs on other machines. Usually what is required is to configure
the service to log on as a domain user that has the necessary access.

HTH,

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 



Re: Mapped File Access Problems in Servlets

2007-08-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Daniel,

Daniel L. Gross wrote:
 I was
 able to change the user to Administrator

This is basically the same as running as root on a UNIX system: it
works, but nobody can really recommend it since you're giving your app
server full access to everything on your box. Caveat server.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGztpN9CaO5/Lv0PARAh9WAJ9uAvVAM/o7mwCpaFawVSUFUU1DLACgmvCo
TFzu87JscSf+fxDbdTmxl+0=
=Mkcz
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Mapped File Access Problems in Servlets

2007-08-23 Thread Daniel L. Gross
I have a servlet that does a direct read from a mapped drive in 
Windows.  It works fine in tomcat as long as I use a drive on the local 
machine.  However, I need to access a mapped drive on a different 
machine.  When I run the program, I get a FileNotFound error in JAVA and 
(access denied) next to it.  Is there some permissions that need to be 
set so my servlet can access a file on another machine.  And how do I 
set this in Tomcat/JAVA.


Thanks,  Dan Gross ATLC


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mapped File Access Problems in Servlets

2007-08-23 Thread Mark Thomas
Daniel L. Gross wrote:
 I have a servlet that does a direct read from a mapped drive in
 Windows.  It works fine in tomcat as long as I use a drive on the local
 machine.  However, I need to access a mapped drive on a different
 machine.  When I run the program, I get a FileNotFound error in JAVA and
 (access denied) next to it.  Is there some permissions that need to be
 set so my servlet can access a file on another machine.  And how do I
 set this in Tomcat/JAVA.
 
 Thanks,  Dan Gross ATLC

This comes down to the Windows user Tomcat is running as. You need to
make sure that that user has the necessary access to the network drives.

If you are running as a service, the default user for services has
zero privs on other machines. Usually what is required is to configure
the service to log on as a domain user that has the necessary access.

HTH,

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mapped File Access Problems in Servlets

2007-08-23 Thread Caldarale, Charles R
 From: Daniel L. Gross [mailto:[EMAIL PROTECTED] 
 Subject: Mapped File Access Problems in Servlets
 
 However, I need to access a mapped drive on a different 
 machine.  When I run the program, I get a FileNotFound error 
 in JAVA and (access denied) next to it.

Are you running Tomcat as a Windows service?  If so, the drive mappings
that you've specified for your account are likely not available to the
service account.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]