Sponsored Content
Operating Systems Solaris Non-root user access to privileged ports-Solaris 8 Post 302342881 by Smiling Dragon on Tuesday 11th of August 2009 02:51:50 AM
Old 08-11-2009
Quote:
Originally Posted by Dyna
You can't but you can use e.g. sudo so that the user can start tomcat with a privileged port..
Umm, with respect, I'd recommend finding another solution. If you start your tomcat app as root, you grant it a great deal more than just the port it wants. If there's a problem with the app, it's no longer a potential issue just for that app, but now for everything else on the server too.

If you really have to have it on the ssl port, run it on a high port and put in an ssh port forward (or if you have solaris 10, a native port redirect).

Another option might be to use apache as your ssl webserver with the tomcat plugin to connect back via localhost to your tomcat application.

Another point to consider: What will you do if you want to host some other ssl app on this server?
 

10 More Discussions You Might Find Interesting

1. Cybersecurity

Allowing access to ports < 1024 w/o root

I need to set up an application to run in a script which will be running as a web server but is a database. I need to allow users to use the web server but the app must be run as root in order for the ports to be accessible. This is not a very secure environment would like to know how this could... (2 Replies)
Discussion started by: rpollard
2 Replies

2. UNIX for Advanced & Expert Users

Forgot the privileged access password in ibm pseries615c3

Hi friends, I am having ibm pseries615c3 server. previously i set privileged access password for the firmware. Now i forgot that password. Help me to reset or remove the firmware password from the server. Otherwise anyone plz help me how to change the default boot device in pseries servers. I... (8 Replies)
Discussion started by: muthulingaraja
8 Replies

3. HP-UX

user commands without root access

Hi I have been asked to find out how to 1) create users 2) reset passwords 3) kill processes that may require root privileges without having root password, sudo rights or rights to passwd command Any ideas? Thanks in advance (1 Reply)
Discussion started by: emealogistics
1 Replies

4. Solaris

I can not access root user through LAN

Dear i have installed Solaris 10 on SUN V240 after installation i can not access system through root user if i access system through any other user it conects but root is not connecting through LAN if i connect through SC and then access root though cosole -f command it also works kindly... (6 Replies)
Discussion started by: rizwan225
6 Replies

5. Shell Programming and Scripting

access user history as root

Hi, I need to access a user's command history. However, the dilemma is that he is logged in and so his current history is not yet flushed to .bash_history file which gets flushed when he logs out. Is there a way I can still access his most recent history? thank you, S (4 Replies)
Discussion started by: sardare
4 Replies

6. UNIX for Dummies Questions & Answers

How to allow access to some commands having root privleges to be run bu non root user

hi i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help Thanks (5 Replies)
Discussion started by: suryashikha
5 Replies

7. Linux

nix User Access Restrictions to Network, USB ports, PCMCIA, CDROM

How to create a user account on a Linux desktop machine with restrictions on connecting to the LAN, WAN, PCMCIA ports, Firewire, CDROM and generally any user controllable output options? I have the task to set up a machine for users working with sensitive data that should not be leaving the... (1 Reply)
Discussion started by: netfreighter
1 Replies

8. Shell Programming and Scripting

How to give root access to non root user?

Currently in my system Red Hat is installed. And Many user connect to my machine via SSH Techia Terminal. I want to give some users a root level access. Can anyone please help me how to make it possible. I too searched on the Google but didn't find the correct way Regards ADI (4 Replies)
Discussion started by: adisky123
4 Replies

9. AIX

How to check that rpcbind/portmap on AIX allowes updates from non privileged ports?

Hi, I am trying to implement a service on AIX based on ONCRPC protocal and I want to use a RPC library called oncrpc4j because it is a non-blocked i/o library. I found it works fine on my work machine (WIndows 7) but failed on my AIX work station. The author of oncrpc4j told me that check that... (1 Reply)
Discussion started by: derekhsu
1 Replies

10. Solaris

Sudo access of rm to non-root user

Hello, It is Solaris-10. There is a file as /opt/vpp/dom1.2/pdd/today_23. It is always generated by root, so owned by root only. This file has to be deleted as part of application restart always and that is done by app_user and SA is always involved to do rm on that file. Is it possible to give... (9 Replies)
Discussion started by: solaris_1977
9 Replies
Net::Server::PSGI(3)					User Contributed Perl Documentation				      Net::Server::PSGI(3)

NAME
Net::Server::PSGI - basic Net::Server based PSGI HTTP server class TEST ONE LINER
perl -e 'use base qw(Net::Server::PSGI); main->run(port => 8080, ipv => "*")' # runs a default echo server SYNOPSIS
use base qw(Net::Server::PSGI); __PACKAGE__->run(app => &my_echo_handler); # will bind IPv4 port 80 sub my_echo_handler { my $env = shift; my $txt = qq{<form method="post" action="/bam"><input type="text" name="foo"><input type="submit"></form> }; require Data::Dumper; local $Data::Dumper::Sortkeys = 1; require CGI::PSGI; my $form = {}; my $q = CGI::PSGI->new($env); $form->{$_} = $q->param($_) for $q->param; $txt .= "<pre>".Data::Dumper->Dump([$env, $form], ['env', 'form'])."</pre>"; return [200, ['Content-type', 'text/html'], [$txt]]; } DESCRIPTION
If you want a more fully featured PSGI experience, it would be wise to look at the Plack and Starman set of modules. Net::Server::PSGI is intended as an easy gateway into PSGI. But to get the most out of all that PSGI has to offer, you should review the Plack and Plack::Middleware. If you only need something a little more rudimentary, then Net::Server::PSGI may be good for you. Net::Server::PSGI takes Net::Server::HTTP one level farther. It begins with base type MultiType defaulting to Net::Server::Fork. It is easy to change it to any of the other Net::Server flavors by passing server_type => $other_flavor in the server configurtation. The port has also been defaulted to port 80 - but could easily be changed to another through the server configuration. You can also very easily add ssl by including, proto=>"ssl" and provide a SSL_cert_file and SSL_key_file. For example, here is a basic server that will bind to all interfaces, will speak both HTTP on port 8080 as well as HTTPS on 8443, and will speak both IPv4, as well as IPv6 if it is available. use base qw(Net::Server::PSGI); __PACKAGE__->run( port => [8080, "8443/ssl"], ipv => '*', # IPv6 if available SSL_key_file => '/my/key', SSL_cert_file => '/my/cert', ); METHODS
"process_request" This method has been overridden in Net::Server::PSGI - you should not use it while using Net::Server::PSGI. This overridden method parses the environment and sets up request alarms and handles dying failures. It calls process_psgi_request once the request is ready and headers have been parsed. "process_psgi_request" Used when psgi_enabled is true. During this method, find_psgi_handler will be called to return the appropriate psgi response handler. Once finished, print_psgi_headers and print_psgi_body are used to print out the response. See PSGI. Typically this method should not be overridden. Instead, an appropriate method for finding the app should be given to find_psgi_handler or app. "find_psgi_handler" Used to lookup the appropriate PSGI handler. A reference to the already parsed $env hashref is passed. PATH_INFO will be initialized to the full path portion of the URI. SCRIPT_NAME will be initialized to the empty string. This handler should set the appropriate values for SCRIPT_NAME and PATH_INFO depending upon the path matched. A code reference for the handler should be returned. The default find_psgi_handler will call the "app" method. If that fails a reference to the psgi_echo_handler is returned as the default application. sub find_psgi_handler { my ($self, $env) = @_; if ($env->{'PATH_INFO'} && $env->{'PATH_INFO'} =~ s{^ (/foo) (?= $ | /) }{}x) { $env->{'SCRIPT_NAME'} = $1; return &foo_app; } return $self->SUPER::find_psgi_handler($env); } "app" Return a reference to the application being served. This should be a valid PSGI application. See PSGI. By default it will look at the value of the "app" configuration option. The "app" method may also be used to set the "app" configuration option. package MyApp; use base qw(Net::Server::PSGI); sub default_server_type { 'Prefork' } sub my_app { my $env = shift; return [200, ['Content-type', 'text/html'], ["Hello world"]]; } MyApp->run(app => &my_app); # OR sub app { &my_app } MyApp->run; # OR my $server = MyApp->new; $server->app(&my_app); $server->run; OPTIONS
In addition to the command line arguments of the Net::Server::HTTP base classes you can also set the following options. app Should return a coderef of the PSGI application. Is returned by the app method. AUTHOR
Paul T. Seamons paul@seamons.com SEE ALSO
Please see also Plack, Starman, Net::Server::Fork, Net::Server::INET, Net::Server::PreFork, Net::Server::PreForkSimple, Net::Server::MultiType, Net::Server::Single Net::Server::SIG Net::Server::Daemonize Net::Server::Proto Net::Server::HTTP perl v5.18.2 2012-06-11 Net::Server::PSGI(3)
All times are GMT -4. The time now is 07:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy