tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Thatcher" <n8thatc...@gmail.com>
Subject Re: List remote files in Servlet
Date Tue, 05 Aug 2008 22:38:06 GMT
Turns out that was the issue. I set tomcat to run as a local user and
now it works. Thanks for the help.

On Tue, Aug 5, 2008 at 4:15 PM, Nathan Thatcher <n8thatcher@gmail.com> wrote:
> On Tue, Aug 5, 2008 at 3:53 PM, Steve Ochani <ochanis@ncc.edu> wrote:
>> Date sent:              Tue, 05 Aug 2008 15:45:26 -0600
>> From:                   Nathan Thatcher <n8thatcher@gmail.com>
>> Subject:                List remote files in Servlet
>> To:                     users@tomcat.apache.org
>> Send reply to:          Tomcat Users List <users@tomcat.apache.org>
>>
>>> I am experiencing a little problem with Tomcat 6.0 and I haven't been
>>> able to determine the cause or solution. In a standalone Java
>>> application I can list the files from a remote directory like this:
>>>
>>> File[] list = new File("//192.168.0.1/shared_dir").listFiles();
>>>
>>> When I execute the same code in a servlet running on the same machine
>>> the call to listFiles() always returns null. Is this a security
>>> problem? I am not seeing any errors in the logs and I haven't changed
>>> any of the default security settings for Tomcat of Java. Since I don't
>>> know what the problem is I have had a hard time tracking down a
>>> solution online. Any idea why listFiles() doesn't work in a servlet?
>>>
>>
>> The most likely problem is that Tomcat is running under a user that doesn't have
permission
>> to that share.
>>
>>
>> -Steve O.
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
> Tomcat is running on a windows machine under the SYSTEM account so I
> assume that it has the permissions. Is there a way to check if this is
> the problem?
>

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


Mime
View raw message