Limiting access

Hi, I'm new to linux and unix, and i have couple of problems:

1) how can i limit the access for a user, for example, i created a user, and i want that this user will be able to be only in one directory, and will see only the files i want him to.

2) I have a domain name, and i want that every time i type this domain name in the browser, it will be connected to my unix/linux server. (to connect a DNS with my own server)

10Q very much...

1) Since the 'cd' command is a shell builtin, you would have to write (or modify) your own shell to remove the ability to change directories with this command. An alternative might be to have his login script run a program which calls the chroot() system call. do a 'man chroot' for information.
I suggest finding a local Unix guru to help you.

2) Contact an ISP and pay them to put your DNS info in their servers, or look into using <A HREF="">The Public DNS Service</A>.

Oh..ok, and another question,
if i did FTP from my ip, and i give someone username and password, how can i make his root directory to be something that's not root (for example his home directory)?

To do as you wish, you could use chroot in the /etc/password file in the last field (where the shell is). For example, to make the user have a root of /home/misha, then you would change the final field in /etc/password to be something like:

/usr/bin/chroot /usr/misha /bin/sh

In most implementations (and the GNU version) the shell does not have do be specified because without an argument the default shell is the command.

As PxT suggests, chroot is the approach. However, building a chroot environment can be tricky because commands that a user would normally have access to are not available unless explicitly under the new chroot directory. In other words, you must build a new environment under the new pseudo root file system and provide all commands.

This could be difficult for newbies, but it can be done I suggest reading the chroot manpage and supporting documents carefully.

first of all, thank you for all your help,
second: I dont really got you, please tell me step by step how to limit me.
give me an example with user named test.
i want to limit him to be only in the directory of: /home/test
and I think my passwd file is shadowed.