Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Let's suppose we give to different users(clients) different domains (one domain for one user) in our glassfish application server for their work. This glassfish works in centos 6 server. Every user has his user folder in /home (/home/user1, /home/user2). Glassfish is installed in /usr/glassfish..... and runs as "glassfish" linux user.

And every user(client) wants to have an alternate docroot(s). Here's is the problem. Every user has access only to his home folder. So it's the place where he wants to have alternate docroot(s) to keep his data. In order for glassfish to get users' alternate docroots we open users' folders (/home/user1, /home/user2) for glassfish. But now, every user can deploy his application and get another user's alternate docroot. Because it's the user sets alternate docroot folder not the admin.

Here is the big difference - in apache it's the administrator who sets webserver folders for reading.

So either my vision is wrong or how can it be fixed?

[EDITED] Here I am talking about one linux server with one IP and one glassfish application server in that linux server. To supply services to our clients we don't install different glassfish servers we give them different domains in the same glassfish server as I see it's the best strategy.

share|improve this question

1 Answer 1

Glassfish domains

Looking at the official documentation it doesn't sound like one application for one domain can gain access to another domains space.


A domain is an administrative boundary that contains a group of GlassFish Server instances that are administered together. Each instance can belong to only one domain. A domain provides a preconfigured runtime for user applications. Each domain has its own configuration data, log files, and application deployment areas that are independent of other domains. If the configuration is changed for one domain, the configurations of other domains are not affected.

Domains enable different organizations and administrators to share securely a single GlassFish Server installation. Each organization or administrator can administer the instances in a single domain without affecting the instances in other domains.

At installation time, GlassFish Server creates a default domain that is named domain1. After installation, you can create additional domains as necessary.

When a domain is created, you are prompted for the administration user name and password. If you accept the default, the user admin is created without pass

source: Domains for Administering GlassFish Server

share|improve this answer
Thank you for your answer. But I didn't get the point. As I understand it doesn't matter how you open user's directory for glassfish - by unix permissions or by acl. Because the most important that glassfsih will have access to all users' directories and one user can configure glassfish to get data from another user folder. – iJava Nov 2 '13 at 5:42
I have serious doubts that every user in glassfish has his own instance. Because 1. it will kill your server as glassfsih is rather serious application 2. it kills the idea of domains and domain administrators and server instance control. – iJava Nov 2 '13 at 5:50
@PashaTurok - we did this very thing for every user using JBoss! Jetty too. I think you need to expand your Q and better explain the user case, it's not making sense to me at this point what you're actually trying to solve. I get what you're asking but I don't understand what you're ultimately trying to solve here. – slm Nov 2 '13 at 5:52
To tell the truth I worked neither with JBoss nor with jetty. But I read a lot off about glassfish. And I am sure you must have one glassfish server in you box. After that you work with domains and server instance. See here – iJava Nov 2 '13 at 5:57
I edited the Q. I didn't work with ATG :( – iJava Nov 2 '13 at 6:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.