You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gary <wo...@gmail.com> on 2009/08/24 08:43:41 UTC

Running tomcat as limited user (MS Windows)

I must have had this problem before but can't remember how I solved it.

I normally run as a limited user. I installed tomcat okay (simply
switching to an administrator account to do so) but trying to start
the server results in

 java.util.logging.ErrorManager: 4
 java.io.FileNotFoundException:
C:\Programme\Develop\CC_EnterpriseClient\server\t
 omcat\logs\catalina.2009-08-23.log (Zugriff verweigert)
         at java.io.FileOutputStream.openAppend(Native Method)
         at java.io.FileOutputStream.<init>(Unknown Source)
         at java.io.FileOutputStream.<init>(Unknown Source)
         at java.io.FileWriter.<init>(Unknown Source)
         at org.apache.juli.FileHandler.open(FileHandler.java:259)
         at org.apache.juli.FileHandler.<init>(FileHandler.java:59)
         at org.apache.juli.FileHandler.<init>(FileHandler.java:50

Basically, the user I am logged in as does not have permission to
write to the logs directory, and I would assume the same problem will
occur with the webapps directory when I try to deploy what I am
developing.

Any ideas how to solve this?

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


Re: Running tomcat as limited user (MS Windows)

Posted by Serge Fonville <se...@gmail.com>.
>> Clue for anyone else who comes across this: you have to switch off
>> file sharing to be able to even see the place you need to make the
>> changes - http://support.microsoft.com/kb/308419. FFS, MS...
>>
>
> Ah - you hadn't said Windows XP, so I'd assumed a server-class OS!  Yes, XP
> comes with brain-damaged "simple file sharing" turned on by default, which
> both hides and breaks the normal Windows file permissions model.

If your not running professional but home edition.
You will probably need cacls and net to perform the required operations.
cacls to change permissions and net to alter groups and users.
To take ownership, this can only easily be done through the gui (the
security tab and click away...windows style ;-))

HTH

Regards,

Serge Fonville

On Mon, Aug 24, 2009 at 9:34 AM, Peter
Crowther<pe...@melandra.com> wrote:
> 2009/8/24 Gary <wo...@gmail.com>
>
>> Clue for anyone else who comes across this: you have to switch off
>> file sharing to be able to even see the place you need to make the
>> changes - http://support.microsoft.com/kb/308419. FFS, MS...
>>
>
> Ah - you hadn't said Windows XP, so I'd assumed a server-class OS!  Yes, XP
> comes with brain-damaged "simple file sharing" turned on by default, which
> both hides and breaks the normal Windows file permissions model.
>
> Glad you found it.
>
> - Peter
>

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


Re: Running tomcat as limited user (MS Windows)

Posted by Peter Crowther <pe...@melandra.com>.
2009/8/24 Gary <wo...@gmail.com>

> Clue for anyone else who comes across this: you have to switch off
> file sharing to be able to even see the place you need to make the
> changes - http://support.microsoft.com/kb/308419. FFS, MS...
>

Ah - you hadn't said Windows XP, so I'd assumed a server-class OS!  Yes, XP
comes with brain-damaged "simple file sharing" turned on by default, which
both hides and breaks the normal Windows file permissions model.

Glad you found it.

- Peter

Re: Running tomcat as limited user (MS Windows)

Posted by Gary <wo...@gmail.com>.
On 24/08/2009, Gary <wo...@gmail.com> wrote:
> On 24/08/2009, Peter Crowther <pe...@melandra.com> wrote:
>> 2009/8/24 Gary <wo...@gmail.com>
>>
>>> I normally run as a limited user.
>>
>>
>> i.e. non-Administrator?
>
> Yes, exactly.
[...]
>> Add write permission on those directories for the account under which
>> you're
>> running Tomcat?
>
> Is that even possible on Windows?

Ah... Yes. After quite a bit of f..iddling about, I see it is. That
works fine. Thanks, Peter.

Clue for anyone else who comes across this: you have to switch off
file sharing to be able to even see the place you need to make the
changes - http://support.microsoft.com/kb/308419. FFS, MS...

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


Re: Running tomcat as limited user (MS Windows)

Posted by Gary <wo...@gmail.com>.
On 24/08/2009, Peter Crowther <pe...@melandra.com> wrote:
> 2009/8/24 Gary <wo...@gmail.com>
>
>> I normally run as a limited user.
>
>
> i.e. non-Administrator?

Yes, exactly.

[...]
>> Basically, the user I am logged in as does not have permission to
>> write to the logs directory, and I would assume the same problem will
>> occur with the webapps directory when I try to deploy what I am
>> developing.
>>
>> Any ideas how to solve this?
>>
>
> Add write permission on those directories for the account under which you're
> running Tomcat?

Is that even possible on Windows?

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


Re: Running tomcat as limited user (MS Windows)

Posted by Peter Crowther <pe...@melandra.com>.
2009/8/24 Gary <wo...@gmail.com>

> I normally run as a limited user.


i.e. non-Administrator?


>   java.io.FileNotFoundException:
> C:\Programme\Develop\CC_EnterpriseClient\server\t
>  omcat\logs\catalina.2009-08-23.log (Zugriff verweigert)
>         at java.io.FileOutputStream.openAppend(Native Method)
>         at java.io.FileOutputStream.<init>(Unknown Source)
>         at java.io.FileOutputStream.<init>(Unknown Source)
>         at java.io.FileWriter.<init>(Unknown Source)
>         at org.apache.juli.FileHandler.open(FileHandler.java:259)
>         at org.apache.juli.FileHandler.<init>(FileHandler.java:59)
>         at org.apache.juli.FileHandler.<init>(FileHandler.java:50
>
> Basically, the user I am logged in as does not have permission to
> write to the logs directory, and I would assume the same problem will
> occur with the webapps directory when I try to deploy what I am
> developing.
>
> Any ideas how to solve this?
>

Add write permission on those directories for the account under which you're
running Tomcat?

- Peter