04-15-2008
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.
10 More Discussions You Might Find Interesting
1. HP-UX
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
2. UNIX for Advanced & Expert Users
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
3. UNIX for Dummies Questions & Answers
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
4. UNIX for Advanced & Expert Users
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
5. UNIX for Dummies Questions & Answers
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
6. Red Hat
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
7. UNIX for Dummies Questions & Answers
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
8. Shell Programming and Scripting
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
9. UNIX for Dummies Questions & Answers
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
10. Shell Programming and Scripting
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
LEARN ABOUT MOJAVE
chroot
CHROOT(2) BSD System Calls Manual CHROOT(2)
NAME
chroot -- change root directory
SYNOPSIS
#include <unistd.h>
int
chroot(const char *dirname);
DESCRIPTION
Dirname is the address of the pathname of a directory, terminated by an ASCII NUL. chroot() causes dirname to become the root directory,
that is, the starting point for path searches of pathnames beginning with '/'.
In order for a directory to become the root directory a process must have execute (search) access for that directory.
If the program is not currently running with an altered root directory, it should be noted that chroot() has no effect on the process's cur-
rent directory.
If the program is already running with an altered root directory, the process's current directory is changed to the same new root directory.
This prevents the current directory from being further up the directory tree than the altered root directory.
This call is restricted to the super-user.
RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate an error.
ERRORS
chroot() will fail and the root directory will be unchanged if:
[ENOTDIR] A component of the path name is not a directory.
[ENAMETOOLONG] A component of a pathname exceeded {NAME_MAX} characters, or an entire path name exceeded {PATH_MAX} characters.
[ENOENT] The named directory does not exist.
[EACCES] Search permission is denied for any component of the path name.
[ELOOP] Too many symbolic links were encountered in translating the pathname.
[EFAULT] Path points outside the process's allocated address space.
[EIO] An I/O error occurred while reading from or writing to the file system.
SEE ALSO
chdir(2)
WARNINGS
There are ways for a root process to escape from the chroot jail.
HISTORY
The chroot() function call appeared in 4.2BSD.
4.2 Berkeley Distribution June 4, 1993 4.2 Berkeley Distribution