LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-29-2013, 11:04 AM   #1
l0pht
Member
 
Registered: Sep 2008
Posts: 79

Rep: Reputation: 1
ssh chroot


Hi Experts
i have a question around creating limited user permission on linux.
i want to make a user to full access for rwx in on specific directory! for example just /var/www/html or home directory's folder, it should not access up directory or others.
what can i do? i can use sudoers file?

thanks
 
Old 12-29-2013, 01:45 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
No sudoers please, sudo is used for giving access to applications, not directories.
If you want to give a user full access to a specific directory just make him the owner of theat directory and set the access rights correctly. You will need the commands chown and chmod for this.
Alternatively (and better if you have several users that need access) create a new group, make that group owner of that directory and add the user to that group. Then set the access rights correctly.
For more info on access rights, users and groups have a look at chapters 9 and 10 in the Slackbook: http://www.slackbook.org/beta/
 
Old 12-29-2013, 03:42 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Users need to be able to at least read other directories (e.g. the user's shell program is generally in /bin, so users need to be able to execute files in /bin to be able to login). It is possible to create a chroot jail so that users can only access a subset of files on the system, but what are you trying to accomplish here?
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Chroot SSH problem: ssh working, not SFTP & SCP. NaCo Linux - Security 3 02-01-2009 02:23 AM
chroot ssh maxy7710 Linux - Newbie 4 08-28-2008 10:51 AM
chroot ssh Manuel-H Slackware 3 09-15-2005 05:33 PM
ssh for chroot Thorsten Linux - Security 1 08-26-2003 05:46 AM
ssh for chroot Thorsten Linux - Software 0 08-26-2003 03:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:10 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