LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-07-2007, 10:20 AM   #1
0perat0r
Member
 
Registered: Jul 2004
Location: New Jersey, US
Distribution: Red Hat Linux WS version 3
Posts: 126

Rep: Reputation: 15
permissions over one directory only


I need to set permissions on a directory such that a group has access to that folder only. The group should not be able to access any other part of ths system. I've explored chown, chgrp, etc. and ACLs. What's the ebst strategy here? What command or set of commands is appropriate? Any help is appreciated, thanks. I'm running Red Hat EL3.
 
Old 12-07-2007, 10:54 AM   #2
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,441

Rep: Reputation: 70
It depends on what you mean by "access". If you don't even want those group members to have read access anywhere else then you are going to need a chroot environment.

Otherwise, simply create a user that is part of only groups that have no permissions anywhere (create a new unique group for the user). Make their home directory that one folder they should have access to and make sure the permissions are set correctly for it. Using this method they will still be able to read any files that are world readable (including the files under /bin that are needed to execute basic commands).

Again, if you want true access to only one directory chroot is the way to go. man chroot for more info on it. You can also find out more information on how to use it through some internet searching.
 
Old 12-07-2007, 11:18 AM   #3
0perat0r
Member
 
Registered: Jul 2004
Location: New Jersey, US
Distribution: Red Hat Linux WS version 3
Posts: 126

Original Poster
Rep: Reputation: 15
OK, so I looked up chroot and I'm not understanding what syntax I should use. Would someone please tell me if this is the correct syntax:

chroot -u username newroot /newlocation

Does this look right?

Thanks
 
Old 12-07-2007, 05:23 PM   #4
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,441

Rep: Reputation: 70
When setting up a linux jail via chroot you have to do more than just "chroot /path/to/new/root". You need to have copies of commands they need to run and so on.

I recommend using a software tool such as jailkit to help you set this up. There may be better software tools, but the other ones that come to mind right now are for sftp-only scenarios.

You should also read this page about breaking out of a chroot jail. If gives some good introductory info plus it tells you how to avoid setting up a faulty jail.
 
  


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
Directory permissions kramer2718 Linux - Newbie 3 08-29-2006 06:06 PM
directory permissions allelopath Linux - General 3 01-01-2006 02:43 PM
directory permissions goodolday Linux - Newbie 6 04-28-2005 01:51 AM
Directory Permissions mbjunior99 Mandriva 2 02-27-2005 07:17 PM
write permissions for directory - not accidently move/deleted the directory linuxgamer Linux - Newbie 10 12-02-2003 03:04 AM


All times are GMT -5. The time now is 06:46 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration