LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cant figure out how to limit user acess (https://www.linuxquestions.org/questions/linux-newbie-8/cant-figure-out-how-to-limit-user-acess-895222/)

darrylshawn 08-03-2011 01:20 AM

Cant figure out how to limit user acess
 
Im new to linux and would like help or to be taught .

My question is how do i limit users to their own directory for an example

User andrew

/home/andrew cant acess root or usr

For Ftp and SSh please help

acid_kewpie 08-03-2011 01:37 AM

well for ftp you can use a "chroot jail", but when they are logging in for shell sessions via ssh then if they can't access /usr they can't run any programs that live there, which is very unlikely to be what you want. A normal user can never access /root if that's what you meant by "root". If you can explain your needs more clearly I'm sure we can work out what you want. e.g. what FTP server are you trying to configure? If it's vsftpd then try this: http://www.brennan.id.au/14-FTP_Server.html

darrylshawn 08-03-2011 01:41 AM

How do i check what ftp im using ?

acid_kewpie 08-03-2011 01:43 AM

well you couldn't have got it running in the first place if you don't know, surely??? personally i'd run "netstat -plnt" and see what process was listening on port 21.

darrylshawn 08-03-2011 01:46 AM

[root@main ~]# netstat -plnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:877 0.0.0.0:* LISTEN 1967/rpc.statd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1928/portmap
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2241/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2272/sendmail: acce

uhh i dont know what im doin g or what i should do lol

acid_kewpie 08-03-2011 01:47 AM

well you aren't running an ftp server at all. So no worry there then.

Please don't send private emails to users, keep things on a thread.

darrylshawn 08-03-2011 01:50 AM

i still dont understand if im not running an ftp server how can i acess my server using filezilla from my home and the question is how to find out to limit users to their home dir in ftp

acid_kewpie 08-03-2011 02:05 AM

well you're certainly not using ftp. maybe sftp? http://adamsworld.name/chrootjailv5.php

darrylshawn 08-03-2011 02:14 AM

Yes im using sftp sorry i didnt notice there was a difference. so Above guide will limit user acess?

acid_kewpie 08-03-2011 02:53 AM

it will limit to sftp only, not ssh, you've still not defined what you actually want to achieve and why though. Note that you need to understand why things work as they do in order to know what you should want to achieve. Don't do things, or attempt to do things, for the sake of it.

chrism01 08-03-2011 07:40 PM

If you are using sftp, this is another useful link http://www.openbsd.org/cgi-bin/man.c...nfig&sektion=5, but you should definitely read acid_kewpie's link first.


All times are GMT -5. The time now is 12:04 PM.