The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Red Hat
.
google unix.com



Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Restrict user access to their home dir rdns UNIX for Dummies Questions & Answers 10 05-26-2008 10:28 AM
Restrict FTP access to a single directory for only one user. santhoshkumar_d UNIX for Advanced & Expert Users 8 05-23-2008 08:08 AM
How to restrict a user group to access the kernel harishankar HP-UX 0 08-09-2007 02:09 AM
restrict tcp-port access remivisser UNIX for Dummies Questions & Answers 2 05-18-2004 04:33 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 4.00 average. Display Modes
  #1 (permalink)  
Old 04-15-2008
vikas027 vikas027 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 77
Question restrict access of a user to two directories only

Hi all,

I am using RHEL 5.0

I need a user say test to have full access to two directories, say /tmp1 & /tmp2 only other than his home directory.

I do not want to change his login shell which is ksh or bash by default.
Moreover, he should not even have read access of other directories.

Pls help!!

Thanks in adv,
VIKAS
  #2 (permalink)  
Old 04-15-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,715
For the user test to be able to run some utilities he may need read access to some files perhaps in /etc or /lib.

Your best bet is to chroot this user - put the user in chroot jail, creates links in his home directory to /tmp1 & /tmp2. This is what is often done with ftp accounts to lock them into completely known file trees
  #3 (permalink)  
Old 04-15-2008
vikas027 vikas027 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 77
Unhappy

Quote:
Originally Posted by jim mcnamara View Post
For the user test to be able to run some utilities he may need read access to some files perhaps in /etc or /lib.

Your best bet is to chroot this user - put the user in chroot jail, creates links in his home directory to /tmp1 & /tmp2. This is what is often done with ftp accounts to lock them into completely known file trees
Can you please exlain a little bit how to put this user in chroot jail.
Thanks.
  #4 (permalink)  
Old 04-15-2008
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
this will introduce to chroot jail

this might be useful as well
  #5 (permalink)  
Old 04-15-2008
vikas027 vikas027 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 77
Quote:
Originally Posted by Yogesh Sawant View Post
this will introduce to chroot jail

this might be useful as well
Thanks Yogesh,
I am trying it,
will get back to you.

Thanks again.
  #6 (permalink)  
Old 04-15-2008
vikas027 vikas027 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 77
Hi,
I followed this link exactly, How to Setup a Chroot Jail - Technical Article Wiki

but still when i logged in through user jdoe. I could easily change directories.

Thanks.
  #7 (permalink)  
Old 04-15-2008
vikas027 vikas027 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 77
I downloaded a script from the below link
fuschlberger.net - Howto Setup a chroot-jail for ssh/scp with Linux

everything went fine except this,
Quote:
cp: cannot stat `/lib/ld-lsb.so.1': No such file or directory
cp: cannot stat `/lib/libxcrypt.so.1': No such file or directory
I am running this script as
Quote:
./make_chroot_jail.sh jdoe /bin/bash /home/jail/./home/jdoe
I am able to login to user jdoe BUT still I am able to change directories. Am i doing something wrong. Pls help. !!

Thanks.
Sponsored Links
Closed Thread

Bookmarks

Tags
chroot jail, linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:21 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0