Best practices concerning jails to run applications

Status
Not open for further replies.

ph4nt0m

Cadet
Joined
Mar 24, 2014
Messages
4
Hello,

I'm new to FreeNAS and decided to test it inside a VM before buying any hardware. :) From the docs I understand that any additional software which is not part of FreeNAS should be installed inside its own jail. Since there is no PBI for rtorrent, I created a new portjail and tried to install everything by hand. While doing so, some questions arose:
  1. Would you recommend to create a new user inside the jail? Obviously, tools like rtorrent should not be executed by the root account, but the jail already provides some degree of security by being isolated from the main system. Furthermore, there is no /home inside the jail (adduser produces an error) which might indicate that creating new accounts is not what the developers had in mind.
  2. Many tools like rtorrent and transmission can be controlled by a web interface. Would it be the correct way to install a webserver like lighttpd separately in every jail (i.e. for every application)? This sounds like overkill to me, but on the other hand, every jail has its own IP, anyway.
  3. I observed that the jails (or the associated datasets) eat up quite a large amount of space (at least 1.5 GB each). There is also some hidden dataset named ".warden-template-portjail" of that size. Is there any way to reduce the space requirements? The actual program takes only a small portion, but I guess all the system tools are duplicated for each jail.
Hopefully someone can answer these questions. ;) I'm missing some general guidelines or "best practices" concerning the manual installation of software inside jails.
 
D

dlavigne

Guest
Would you recommend to create a new user inside the jail? Obviously, tools like rtorrent should not be executed by the root account, but the jail already provides some degree of security by being isolated from the main system. Furthermore, there is no /home inside the jail (adduser produces an error) which might indicate that creating new accounts is not what the developers had in mind.

Most installed apps will create their own user/group accounts.

You should not be getting an error with adduser. Please post the output of your adduser session within code tags.
 

ph4nt0m

Cadet
Joined
Mar 24, 2014
Messages
4
The error message is because of the non-existing /home folder:
Code:
mkdir(/home/newuser): No such file or directory


I can mkdir /home of course, but I just thought the fact that it was not there by default might indicate that it's usually not needed. ;)
 
D

dlavigne

Guest
Hmmm, sounds like a bug in the jail template as I have successfully created users in jails before, instructions for doing so are in the docs, and this should be basic functionality. Which version of FreeNAS?
 
D

dlavigne

Guest
Please create a bug report at bugs.freenas.org and post the issue number here.
 
Status
Not open for further replies.
Top