LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-03-2011, 02:20 AM   #1
darrylshawn
LQ Newbie
 
Registered: Aug 2011
Posts: 5

Rep: Reputation: Disabled
Exclamation 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
 
Old 08-03-2011, 02:37 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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
 
Old 08-03-2011, 02:41 AM   #3
darrylshawn
LQ Newbie
 
Registered: Aug 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
How do i check what ftp im using ?
 
Old 08-03-2011, 02:43 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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.
 
Old 08-03-2011, 02:46 AM   #5
darrylshawn
LQ Newbie
 
Registered: Aug 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
[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
 
Old 08-03-2011, 02:47 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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.
 
Old 08-03-2011, 02:50 AM   #7
darrylshawn
LQ Newbie
 
Registered: Aug 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
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
 
Old 08-03-2011, 03:05 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well you're certainly not using ftp. maybe sftp? http://adamsworld.name/chrootjailv5.php
 
Old 08-03-2011, 03:14 AM   #9
darrylshawn
LQ Newbie
 
Registered: Aug 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Yes im using sftp sorry i didnt notice there was a difference. so Above guide will limit user acess?
 
Old 08-03-2011, 03:53 AM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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.
 
Old 08-03-2011, 08:40 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Limit suphp user memory limit? Rundi Linux - Server 2 05-14-2010 01:27 PM
Does not acess root passward from user login sushant_pawar Linux - Security 2 11-26-2009 08:50 AM
Custom PCI driver problems (acess from user-space) - Ubuntu 6.06 / Linux 2.6 kalen Linux - Kernel 0 11-09-2006 07:11 AM
How can i acess like super user...? Khmer Slackware 13 08-13-2005 10:39 AM
user acess spacific to a directory using bash how to x2000koh Programming 2 07-21-2003 11:34 PM


All times are GMT -5. The time now is 01:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration