LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-28-2010, 02:23 AM   #1
dor
LQ Newbie
 
Registered: Feb 2010
Posts: 26

Rep: Reputation: 0
A secured multi user environment


I wish to setup a secured multi user environment. That means that users shouldn't be capable to see other users files/directories (task #1) nor spying on their communication (task #2).

Limiting users to their home directories (task #1) should be done simply by chmod'ding each user's home directory:
$ sudo chmod 0700 /home/username
A permanent chmod solution would be to set the DIR_MODE variable (in /etc/adduser.conf) to 0700.

BUT, users sometimes wish to share files, so only we'll create one user account for that, with the following permissions on his /home directory: 0755 (to share files with ALL users, not only with the user's group)

To prevent users from spying on others' communication (task #2) is pretty much simple: as long there's a single user connected, he couldn't spy on other user's communication because the other user is disconnected...

---------

Am I right?
Would you advice adding an additional level of security?
What would you recommend to do about task #2 when multiple users are connected (e.g. Web hosting service) ?

I appreciate your help.

p.s. using Ubuntu 10.4
 
Old 05-29-2010, 12:26 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Have a look at setfacl, it adds an additional level of permission granting/denying without the need to create additional groups or specific users. It's pretty powerful once you get the hang of it.

This site also has some good tips on user security (starting point 6).

And of course the best reference can be found here on LQ.

Kind regards,

Eric
 
Old 05-30-2010, 08:09 AM   #3
dor
LQ Newbie
 
Registered: Feb 2010
Posts: 26

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by EricTRA View Post
Hello,

Have a look at setfacl, it adds an additional level of permission granting/denying without the need to create additional groups or specific users. It's pretty powerful once you get the hang of it.

This site also has some good tips on user security (starting point 6).

And of course the best reference can be found here on LQ.

Kind regards,

Eric
Thanks for your reply Eric

All the reading material that you supplied is helpful indeed, though I'm looking for a confident solution to this prominent situation.
I'm sure that many linux users would be happy to read a popular & tried solution. Thus the question.

Best regards,
Dor
 
Old 05-30-2010, 08:16 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

The level of security you're requiring about already exist in basic Linux environment. Users are not allowed to view/edit another user's documents, as far as I know. There is no need to create an extra user to allow a 'group' of users to access certain documents. You can do that perfectly whit 'setfacl' (give one specific user or group access to your documents). Have you read about setfacl yet?

Or am I misunderstanding you?

Kind regards,

Eric
 
Old 05-30-2010, 09:00 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Quote:
Originally Posted by dor View Post
I wish to setup a secured multi user environment.
Can I ask why? What Real Life threats you must defend against?


Quote:
Originally Posted by dor View Post
(..) users shouldn't be capable to see other users files/directories (task #1) nor spying on their communication (task #2).
As EricTRA already replied basic DAC rights keep unprivileged users from reading files they do not have rights to. Likewise unprivileged users homes in /home should by default be set to have octal 0700 access rights at creation time and users should have their umask set to 0027 through /etc/profile(.d/*).


Quote:
Originally Posted by dor View Post
BUT, users sometimes wish to share files, so only we'll create one user account for that, with the following permissions on his /home directory: 0755 (to share files with ALL users, not only with the user's group)
That should be either ( users added to a common group; chgrp the directory and directory octal mode 1770 ) or using setfacl as EricTRA already replied. Before you turn down CLs (acl.bestbits.ac) do know they have been around for a long time and examples at http://www.suse.de/~agruen/acl/linux-acls/online/ should help get you achieve what you need quickly. (There's even a GUI ACL editor called "Eiciel".)


Quote:
Originally Posted by dor View Post
To prevent users from spying on others' communication (task #2) is pretty much simple: as long there's a single user connected, he couldn't spy on other user's communication because the other user is disconnected...
That kind of goes against your wish for having a "secured multi-user environment" ;-p It also shows why I asked you for reasons because for instance an out-of-the-box basic GNU/Linux installation, or a SELinux-enabled targeted policy-running one, will allow any user to for instance list processes, network connections and open files. Applying more invasive measures, like running a GRSecurity-enabled kernel, can compartmentalize process space. The cost of running a GRSecurity-enabled kernel will only be high if your distribution does not provide GRSecurity-enabled kernels by default. What you want can be done without RBAC rules.


Quote:
Originally Posted by dor View Post
Would you advice adding an additional level of security?
I would advice you to be verbose not about what you want but about what you really need. If you don't know what you need then start by drafting a list of services you offer, who you offer it to and what must be expected from you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi Core Environment - process migration chamila1986 Programming 5 10-04-2009 07:19 AM
What about non secured cmd lines through AIM ?? (ssh like, non secured) frenchn00b Debian 2 11-17-2008 01:52 AM
Multi-Server Web Environment in Debian kkbrow2 Linux - Server 1 08-07-2008 06:52 PM
LXer: Linux 101: Manage user accounts in a multi-user Linux environment ... LXer Syndicated Linux News 0 06-27-2006 07:03 AM
Setting up a multi-user programming environment pembo13 Linux - General 3 01-16-2006 12:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration