Solved

Making the nix box more secure! #1

Posted on 2004-10-05
3
238 Views
Last Modified: 2010-04-20
Hello there,
I have a fedora Linux server with ensim control panel,
Sometimes i give free shells to my friends so they can
Do whatever they want, only for good purposes.
I don’t want them to start going everywhere in there
I mean when they type cd /home and they can see the
Other users dir and files or in /usr anywhere, i don’t want
Any of my friends to be able to see any of those dirs or files
Any way to make that happen? when i add a user i do
adduser "namehere" then it will be added in "/home/namehere"
Thanks for any help!
0
Comment
Question by:Xtry
  • 2
3 Comments
 
LVL 6

Expert Comment

by:blkline
ID: 12229563
This is normal for a Unix box.  You could set up a chroot jail if you so desired but frankly, anything that the users shouldn't get to is protected from them  (or it should be unless you really screwed things up!).

Take note that although one user can do a "cd /home" and see the user's home directories, they can't by default look in them.  The permissions for a home dir are 700, thus giving no access to any but the user (owner) himself.  Try it yourself -- create a new user and then attempt to cd into that user's home directory.  You shouldn't be able to!

Barry



0
 
LVL 6

Expert Comment

by:blkline
ID: 12229586
One other thing -- you didn't mention if you were using FC1 or FC2... the latter has vestiges of SELinux so you can use access control lists.  That will give you better (finer grained) control than earlier versions.  It's turned off by default so you'll need to do a little research before enabling it if you want to use it.

Barry
0
 
LVL 3

Accepted Solution

by:
nalanbar earned 500 total points
ID: 12247458
chmod the directories. Chmod works one three levels: owner, group, everyone else. If you chmod a directory to 764, for example, you will give the owner full permissions, the group write permissions, and everyone else only read permissions. If you use 700, the owner will have full controll, but noone, other than root will be able to look into the directory. Again, the command is "chmod ###" 1 is equal to execute, 2 is equal to write, 4 is equal to read... add the number of the permissions you want together, and that is the umber you use for that field. For example, owner=full permissions, group= read, others get none= chmod 740 (file or directory name).
You can get more info on it if you use man chmod, or here, http://www.mkssoftware.com/docs/man1/chmod.1.asp though this webpage is a little heady...
You could also look into chattr, although that is a HUGE step above chmod...
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Xymon customize http timeout 2 86
Setting up Two Three NICs with One on a Different Subnet 22 78
Can't See Site After DNS Resolved 7 55
android secure ftp 3 38
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question