# Question about user layout



## silmano (Oct 13, 2014)

I've migrated from Gentoo Linux to FreeBSD and I was wondering what is the ideal user setup to follow. In my case I'm building a server with net-p2p/rtorrent and net/samba4 mainly to act as a home seedbox.

In my old OS, I had two users: one to work with and the other to handle the rtorrent and flexget daemon, both with a common GID to be able to rewrite/remove files between each other (at least the ones in torrent directory and Samba share). The main user was the owner of the files in the Samba share and the other user was the owner of the files in the torrent directory.

Since I'm starting with FreeBSD, I'm open to any improvement in this layout, so I was wondering if any of the following points would be useful:

Completely separate one user from the other and grant the other user total control of rtorrent, the torrent directory and the Samba share.
Split each role in a separate user and use ACLs or GID to be able to rewrite/remove each other files.
Any suggestions?


----------



## ShelLuser (Oct 20, 2014)

Late reaction, but you've got the old forum to thank for that; now I can _finally_ go over the real posts I haven't read before and well... respond. Please disregard a small rant 

Now, no stereotyping on my part but lets be honest: using torrents can come with some risks. I'm not talking about the contents being processed, but more so about the kids out there who are looking into all this. After all, once you start using it you more or less do become part of a few torrent clouds.

And when risk management is involved my personal approach is always to separate things. It's basically how I run things on my servers; most processes on my system (looking at apache, postfix but also stuff such as ircd) use their own dedicated UID. It can help you to keep things controllable.

So to keep control I'd definitely look into GID's and ACL's. Just make sure you don't set up a too complex scheme, otherwise you may run into trouble at a later time (if you need to change things after you haven't changed anything on the system for several months). Option 2.

If you want even more control/security then perhaps you should also look into jails.

But for now; I'd go for option 2. If the scheme worked before then why change it?


----------



## fonz (Oct 20, 2014)

ShelLuser said:


> So to keep control I'd definitely look into GID's and ACL's.
> [snip]
> If you want even more control/security then perhaps you should also look into jails.


To elaborate: on my personal domain server (which has to be one physical box) I jail every service and use NIS to share UIDs/GIDs between the host and jails. Note that every jail (NIS client) can exclude any UID, GID or group thereof as needed. For an actually networked environment NIS is probably outdated, but for this particular purpose I think it still works nicely.


----------

