Sponsored Content
Top Forums UNIX for Dummies Questions & Answers restrict one user to see only his home directory in his profile Post 302284727 by ynilesh on Friday 6th of February 2009 08:22:28 AM
Old 02-06-2009
You need to do lots of customization. By defalut system gives you read access of most of the directories/files. You can try creating chroot like environment.

- nilesh
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Restrict users to ther home directory

Hello! I want users in a certain group to be restricted to their home directory. So that they have full access to all files and folders in their home directory but the cant go to any directory above. Does anyone know how to do this? Anders (1 Reply)
Discussion started by: alfabetman
1 Replies

2. Solaris

need to restrict user to his home dir

Hello, i need to create a user who's access is restricted only to his home directory and below, i restricted his pty access by adding 'no-pty' to the options of the ssh key in authorized_keys file. However, sftp access still allows this user access to all my file system thanks (5 Replies)
Discussion started by: lidram
5 Replies

3. 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

4. UNIX for Dummies Questions & Answers

how do U restrict a user to a single directory?

specifically - I don't need to restrict a user to a single directory - but I want them to be "ROOTED" to their home directory. so if my home directory is /home/onlyme when I login - if I do a pwd - I want to see: / but in real life I will be in /home/onlyme - it just appears as root to... (10 Replies)
Discussion started by: itobenon
10 Replies

5. UNIX for Dummies Questions & Answers

setting home as lin in user profile

Hi. I have a directory structure built with links. For example: /home/user1 is a link to /var/123/user1 can i set the home variable in the .profile of the user to use a link? or it has to be a "real" directory? tks (1 Reply)
Discussion started by: mrodrig
1 Replies

6. Red Hat

Restrict user to a particular directory

Hi I have a Fedora10 server and i need a particular user to view files only in a particular folder. All other files in other folders having "read" permission for all shouldn't be accessible to this user. Please let me know if ther's a way. Thanks, HG (5 Replies)
Discussion started by: Hari_Ganesh
5 Replies

7. Solaris

Restrict FTP User to a Directory

I am using Solaris 10 on SPARC. SunOS ddw 5.10 Generic_139555-08 sun4u sparc SUNW,SPARC-Enterprise I have put some text files in a directory '/u01/network' I want to create a ftp user which can just read the files in the network directory. The ftp user shouldn't be able to navigate or see... (4 Replies)
Discussion started by: fahdmirza
4 Replies

8. UNIX for Dummies Questions & Answers

Executing profile from any directory other than $HOME

Is there a way to run the profile which is not in $HOME directory? then whats the command for that? (1 Reply)
Discussion started by: SKhan
1 Replies

9. AIX

How to restrict user to a particular directory?

hi, I want to restrict some user access to only 1 directory (including all sub-directories/files in it). can you please explain me, how can we do this? example; Filesystem GB blocks Used Free %Used Mounted on /dev/hd4 2.61 1.02 1.59 40% / /dev/hd2 ... (7 Replies)
Discussion started by: aaron8667
7 Replies

10. UNIX for Beginners Questions & Answers

How to restrict ftpusers in AIX to home directory?

I need to know how to restrict the ftpusers within their home directory in AIX 7.1 For example for ftpuser nonoftp I have tried putting this entry to /etc/ftpaccess.ctl and refreshed inetd but the directory listing unsuccessful error comes with the entry. Without the ftpaccess.ctl file ftp users... (2 Replies)
Discussion started by: pregmi
2 Replies
CHROOT(2)						      BSD System Calls Manual							 CHROOT(2)

NAME
chroot -- change root directory LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> int chroot(const char *dirname); DESCRIPTION
The dirname argument is the address of the pathname of a directory, terminated by an ASCII NUL. The chroot() system call 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. It should be noted that chroot() has no effect on the process's current directory. This call is restricted to the super-user. Depending on the setting of the 'kern.chroot_allow_open_directories' sysctl variable, open filedescriptors which reference directories will make the chroot() fail as follows: If 'kern.chroot_allow_open_directories' is set to zero, chroot() will always fail with EPERM if there are any directories open. If 'kern.chroot_allow_open_directories' is set to one (the default), chroot() will fail with EPERM if there are any directories open and the process is already subject to the chroot() system call. Any other value for 'kern.chroot_allow_open_directories' will bypass the check for open directories RETURN VALUES
Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
The chroot() system call will fail and the root directory will be unchanged if: [ENOTDIR] A component of the path name is not a directory. [EPERM] The effective user ID is not the super-user, or one or more filedescriptors are open directories. [ENAMETOOLONG] A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 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] The dirname argument 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), jail(2) HISTORY
The chroot() system call appeared in 4.2BSD. It was marked as ``legacy'' in Version 2 of the Single UNIX Specification (``SUSv2''), and was removed in subsequent standards. BUGS
If the process is able to change its working directory to the target directory, but another access control check fails (such as a check for open directories, or a MAC check), it is possible that this system call may return an error, with the working directory of the process left changed. SECURITY CONSIDERATIONS
The system have many hardcoded paths to files where it may load after the process starts. It is generally recommended to drop privileges immediately after a successful chroot call, and restrict write access to a limited subtree of the chroot root, for instance, setup the sand- box so that the sandboxed user will have no write access to any well-known system directories. BSD
January 3, 2012 BSD
All times are GMT -4. The time now is 06:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy