LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 01-30-2009, 08:44 AM   #1
colltek
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Rep: Reputation: 0
Restrict a user to only have access to ONE single folder.


Is there a SIMPLE and easy way to restrict a user to only access ONE single folder. I want to enable ssh login, but i dont want then to access more than one maybe two folders.

Please help
 
Old 01-30-2009, 09:00 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Welcome to LQ!!

Permissions are assigned to the owner of the file (or folder), the assigned group, and "all others". So you can create a file (folder) which is only accessible by a specific user, or a specific group. If you use the user method, then the user (as owner) will be able to change certain things. By using groups, you can have tighter control.

To simply restrict one or more users to be able to read files in specific folders, simply assign a group to those folders (and contents) and then add the user(s) to that group.

To be more specific, post an example of a scenario:
How many users?
Should they have read, write, or execute privileges?
 
Old 01-30-2009, 09:37 AM   #3
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
I think he means something like chrooting a user to a specific branch in th e directory tree so they can't access anything on the filesystem but what's in their current and sub directories.

I've always wondered if that was possible myself. The closest thing I've been able to find is a restricted shell that only lets you perform a reduced set of internal commands like ls, cd, etc.
 
Old 01-30-2009, 11:00 AM   #4
colltek
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Admiral Beotch View Post
I think he means something like chrooting a user to a specific branch in th e directory tree so they can't access anything on the filesystem but what's in their current and sub directories.

I've always wondered if that was possible myself. The closest thing I've been able to find is a restricted shell that only lets you perform a reduced set of internal commands like ls, cd, etc.
Thats exactly what i meant! i want some users just to have read/write access in their own home folder.... they shouldnt even be able to read anything else. But i dont have a clue how. Is there an easy way to do this ?
 
Old 01-30-2009, 11:41 AM   #5
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
a quick google turned up this... lemme know how it goes and I'll give it a shot when I wake up in a couple hours!

http://olivier.sessink.nl/jailkit/ho...oot_shell.html
 
  


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
restrict ssh users to single user group winkydo Ubuntu 2 02-25-2008 12:07 PM
how to restrict a user to a single domain in sendmail with multiple domains muralee29477 Linux - Server 2 04-30-2007 02:16 AM
how to restrict one particular user to access one particular folder? Xeratul Linux - Newbie 6 02-06-2007 02:01 PM
how can i restrict a samba user to a single login sravanth.svk Linux - Networking 0 08-25-2006 08:53 AM
restrict user to folder disorderly Linux - Security 5 03-02-2005 10:49 PM


All times are GMT -5. The time now is 08:10 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration