restrict access of a user to two directories only


Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
# 1  
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  
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  
Data

Quote:
Originally Posted by jim mcnamara
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  
this will introduce to chroot jail

this might be useful as well
# 5  
Quote:
Originally Posted by Yogesh Sawant
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  
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  
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.
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #391
Difficulty: Medium
Darwin, the open source subset of macOS, has behavior that can be set to comply with UNIX 03.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Generate list of directories that a user has access to

I manage an AIX OS 7.1 system on IBM Power 770. I want to find out which directories/folders a particular user has read/write access to. How can I cleanly create a list of all directories on the system that a user has access to.. Does this make sense? Thanks in Advance, NEWB:rolleyes: (3 Replies)
Discussion started by: code911
3 Replies

2. UNIX for Dummies Questions & Answers

Restrict access

I'm trying to use squid to restrict elinks' access to certain websites(only http traffic). I have tried some configs in squid.conf but no luck. Hope someone has a bit of time to explain me how can you make these config's :) ---------- Post updated at 05:40 PM ---------- Previous update was at... (1 Reply)
Discussion started by: Birnbacher
1 Replies

3. Shell Programming and Scripting

Allow FTP user to access multiple directories

Hi Experts, I am in urgent need of your suggestions. I have below two users in my system: xyz:x:101:101:XYZ System Account:/export/home/xyz:/bin/bash abc:x:2009:10:ftp user only:/export/home/abc:/bin/false Where "xyz" is the crucial one and "abc" is only introduced for FTPing the... (2 Replies)
Discussion started by: sugarcane
2 Replies

4. UNIX for Dummies Questions & Answers

Rsync on Cygwin - Restrict user to several directories

Hi, I'm using rsync on cygwin (winXP) to sync our files between several laptops and XP (acting as a file server) For simplicity I use the same user account with different certificates over SSH. Now my question is; If a user understands the logic and modifies the rsync command, he can easily... (0 Replies)
Discussion started by: cemo
0 Replies

5. Red Hat

Restrict user access

Hi there I have an application user on my system that wants accesses to these file systems as such: rwx: /SAPO /SAPS12 /R3_888 /R3_888B /R3_888F /R3_888R r: /usr/sap these are the existing FS permissions:ownerships: # ls -ld /SAPO (9 Replies)
Discussion started by: hedkandi
9 Replies

6. UNIX for Dummies Questions & Answers

Restrict user access.

Hi All, How can we restrict a particular user access to a particular shell in solaris 10. Thanks in Advance. (5 Replies)
Discussion started by: rama krishna
5 Replies

7. UNIX for Advanced & Expert Users

Restrict Access to the folder

Hi I have requirement to create 3 new users on my server but to restrict their access to a set of particular folders. /export/home/kapil/shared, /export/home/kapil/shared/Folder1 /export/home/kapil/shared/Folder2 These folders should be accessible to all the 3 users and to me too.... (1 Reply)
Discussion started by: kapilk
1 Replies

8. UNIX for Dummies Questions & Answers

Restrict user access to their home dir

Hi! i'm using FreeBSD 6.2 and hosting my pc to frens in particular of sensitive information being saved to the PC, i would like to know is it possible for me to restrict user access to their /home dir. only? and also, i wanted to restrict them listing files under /etc thanks all! (10 Replies)
Discussion started by: rdns
10 Replies

9. UNIX for Advanced & Expert Users

Restrict FTP access to a single directory for only one user.

Hi All, It will be very great if you can help me in this issue. Thanks in advance. I need to enable FTP on a solaris9 server. I need to create a new user some "xxxxxx" and he can only FTP the files to and from between /tftpboot directory and network devices. Other users should not... (8 Replies)
Discussion started by: santhoshkumar_d
8 Replies

10. HP-UX

How to restrict a user group to access the kernel

Hi, Please any one can help me to know that how we can restrict a user group to access the kernel at all. (0 Replies)
Discussion started by: harishankar
0 Replies

Featured Tech Videos