You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mohammad Tag EL-Deen <mt...@gmail.com> on 2005/10/26 10:31:09 UTC

Tomcat User Permession

I'm using mandrake 10.1 as a server, and jakarta-tomcat-5.0.27.
My intranet running on tomcat should be updated and should use the mandrake
linux users permission for the folders while browsing.
If the intranet is pure html can this happened also?

--
Respectfully,
Mohammad TAg EL-Deen
012 68 10 68 9

Re: Tomcat User Permession

Posted by David Delbecq <de...@oma.be>.
Tomcat's main purpose is to serve webapplications, as defined
by sun. Webapplication are suposed to be contained in a WAR, but
tomcat allow to deploy content of war in a directory. WAR are
zip files and do not support links, so does tomcat. It's follows
the filesystem links only because it is unaware those are links
(the filesystem manage them).

All actions tomcat should do is on behalf of user which started it, which
should be a restricted user for security reasons. If you want to prevent
a user to acces, let's say http://myhost:myport/webappName/ftp/*, then
add a security-constraint in the web.xml (see
http://e-docs.bea.com/wls/docs81/webapp/web_xml.html#1017885)


Once again, tomcat is a java web applications server, not a webserver
serving static content. If you want to server static content, apache
web srver would better suit your needs.

regards,
David Delbecq

Mohammad Tag EL-Deen a écrit :

>the problem is:
>The intranet (website) contains many links to many folders, every folder has
>its own permission owner-group-other.
>i need to prevent the usr who havn't permission to access the folder(
>e.gftp) to access the link to this folder on the website.
>can i do this?
>
>On 10/26/05, David Delbecq <de...@oma.be> wrote:
>  
>
>>Question is not clear, but i'll try to reply.
>>
>>All action attempted by any code inside the jvm running tomcat
>>(that is operations done by JSP, servlet, realms, tomcat itself and
>>any other java classes you may add to webapp) are done
>>on behalf of the user which started tomcat.
>>So if you start tomcat by hand like this:
>>
>>delbd@CAL-12:~/tomcat/jakarta-tomcat-5.5.7$ bin/startup.sh
>>All action will be done on behalf of user 'delbd'
>>If you start tomcat in a startup script, change recommend you set
>>the user to a user named, for example, 'tomcat' which has write
>>access limited to the tomcat directory.
>>
>>Keep in mind, if you want your tomcat to listen on port 80 (this port
>>is reserved for root in linux as it is a so called low port), you will
>>then
>>need to run tomcat as root, which is clearly NOT recommanded!
>>(prefer to run an apache http server on port 80 and prowy the
>>tomcat server using mod_jk)
>>
>>Last but not least, If your tomcat webapp is to serve only html files,
>>it more performant to stick with apache http server!
>>
>>Regard,
>>David Delbecq
>>
>>Mohammad Tag EL-Deen a écrit :
>>
>>    
>>
>>>I'm using mandrake 10.1 as a server, and jakarta-tomcat-5.0.27.
>>>My intranet running on tomcat should be updated and should use the
>>>      
>>>
>>mandrake
>>    
>>
>>>linux users permission for the folders while browsing.
>>>If the intranet is pure html can this happened also?
>>>
>>>
>>>--
>>>Respectfully,
>>>Mohammad TAg EL-Deen
>>>012 68 10 68 9
>>>
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>    
>>
>
>
>--
>Respectfully,
>Mohammad TAg EL-Deen
>012 68 10 68 9
>
>  
>


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


Re: Tomcat User Permession

Posted by Mohammad Tag EL-Deen <mt...@iescom.com>.
the problem is:
The intranet (website) contains many links to many folders, every folder has
its own permission owner-group-other.
i need to prevent the usr who havn't permission to access the folder(
e.gftp) to access the link to this folder on the website.
can i do this?

On 10/26/05, David Delbecq <de...@oma.be> wrote:
>
> Question is not clear, but i'll try to reply.
>
> All action attempted by any code inside the jvm running tomcat
> (that is operations done by JSP, servlet, realms, tomcat itself and
> any other java classes you may add to webapp) are done
> on behalf of the user which started tomcat.
> So if you start tomcat by hand like this:
>
> delbd@CAL-12:~/tomcat/jakarta-tomcat-5.5.7$ bin/startup.sh
> All action will be done on behalf of user 'delbd'
> If you start tomcat in a startup script, change recommend you set
> the user to a user named, for example, 'tomcat' which has write
> access limited to the tomcat directory.
>
> Keep in mind, if you want your tomcat to listen on port 80 (this port
> is reserved for root in linux as it is a so called low port), you will
> then
> need to run tomcat as root, which is clearly NOT recommanded!
> (prefer to run an apache http server on port 80 and prowy the
> tomcat server using mod_jk)
>
> Last but not least, If your tomcat webapp is to serve only html files,
> it more performant to stick with apache http server!
>
> Regard,
> David Delbecq
>
> Mohammad Tag EL-Deen a écrit :
>
> >I'm using mandrake 10.1 as a server, and jakarta-tomcat-5.0.27.
> >My intranet running on tomcat should be updated and should use the
> mandrake
> >linux users permission for the folders while browsing.
> >If the intranet is pure html can this happened also?
> >
> >
> >--
> >Respectfully,
> >Mohammad TAg EL-Deen
> >012 68 10 68 9
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


--
Respectfully,
Mohammad TAg EL-Deen
012 68 10 68 9

Re: Tomcat User Permession

Posted by David Delbecq <de...@oma.be>.
Question is not clear, but i'll try to reply.

All action attempted by any code inside the jvm running tomcat
(that is operations done by JSP, servlet, realms, tomcat itself and
any other java classes you may add to webapp) are done
on behalf of the user which started tomcat.
So if you start tomcat by hand like this:

delbd@CAL-12:~/tomcat/jakarta-tomcat-5.5.7$ bin/startup.sh
All action will be done on behalf of user 'delbd'
If you start tomcat in a startup script, change recommend you set
the user to a user named, for example, 'tomcat' which has write
access limited to the tomcat directory.

Keep in mind, if you want your tomcat to listen on port 80 (this port
is reserved for root in linux as it is a so called low port), you will then
need to run tomcat as root, which is clearly NOT recommanded!
(prefer to run an apache http server on port 80 and prowy the
tomcat server using mod_jk)

Last but not least, If your tomcat webapp is to serve only html files,
it more performant to stick with apache http server!

Regard,
David Delbecq

Mohammad Tag EL-Deen a écrit :

>I'm using mandrake 10.1 as a server, and jakarta-tomcat-5.0.27.
>My intranet running on tomcat should be updated and should use the mandrake
>linux users permission for the folders while browsing.
>If the intranet is pure html can this happened also?
>  
>
>--
>Respectfully,
>Mohammad TAg EL-Deen
>012 68 10 68 9
>
>  
>


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