LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-22-2011, 06:49 AM   #1
kirthanshetty
LQ Newbie
 
Registered: Nov 2011
Posts: 9

Rep: Reputation: Disabled
lock the user to home folder in cent os


hi
how to lock the user to their home dir.. so that they should not be able view root dir.. via ssh and sftp in cent os please help me....
 
Old 12-22-2011, 07:04 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
what would they do on ssh if they can't see other directories? It's possible but *might* not be what you think it is. You'd need a chroot jail, and there are plenty of ssh chroot guides around if you have a search.
 
Old 12-22-2011, 08:14 AM   #3
jayakumar01
Member
 
Registered: Nov 2011
Posts: 106

Rep: Reputation: Disabled
hi

Best way to denied user to access root directory by enabling chmod 770. So that user cannot able to access root home directory


7 -root
7 -group
0 -users

If i understand is wright .these could solve ur problem
 
Old 12-23-2011, 03:13 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by jayakumar01 View Post
hi

Best way to denied user to access root directory by enabling chmod 770. So that user cannot able to access root home directory


7 -root
7 -group
0 -users

If i understand is wright .these could solve ur problem
I'd be inclined to think they mean /, not /root. /root should never be accessible by default in the first place.
 
  


Reply



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
Lock user in home dir JJX Linux - General 9 06-28-2011 02:09 PM
I can not open the user folder in home and write in a shared folder jorge_ivan Linux - General 8 08-02-2006 11:28 AM
how to lock and encrypt a folder in my home? greythorne SUSE / openSUSE 4 06-26-2005 02:18 PM
lock new user into home dir eyewittness Linux - Security 4 06-19-2005 12:33 PM
Lock user in their home dir MarleyGPN Linux - Software 1 04-26-2003 05:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:42 PM.

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
Open Source Consulting | Domain Registration