Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 08-30-2012, 01:07 PM   #1
Registered: Apr 2004
Posts: 194

Rep: Reputation: 15
Folder sharing under jail Shell

Hello Folks,

I have set up SFTP file server where I have enabled jail Shell and locked the users in their home directory. This is working fine but what if few users would like to share the files among themselves? Since chroot doesn't allow me go back and see other file structure not sure how can I implement it.

Any clue?

e.g. user.example. ---> Allows to login directly into /home/user.example

user.example would also need access or /share.
Old 08-30-2012, 02:59 PM   #2
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.2, LFS-current, NetBSD 6.1.3, OpenIndiana
Posts: 319

Rep: Reputation: 112Reputation: 112
Instead of locking the users in their home directories, why don't you just jail all of /home?
Then just change all the permissions under /home to rwx-r-x---
chmod -R 750 /home/*
The files under those directories should be rwx-r----
chmod -R 740 /home/*/
This way you can share between /home directories, but each user can't modify any files that are not their own.

This is the only way I know how to do it without breaking the jail.
For files that you don't to share you can change the permissions on the files or folder to rwx-------- this way only the owner of the file/directory can access and read it.
chmod 700 /path/to/file


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
Jail shell fredo2906 Linux - Newbie 6 06-07-2012 10:00 AM
nfs server - sharing folder - folder permission dlugasx Linux - Server 1 02-15-2011 12:30 AM
[SOLVED] chroot jail problem: 'empty' jail MatrixS_Master Linux - Security 4 03-27-2010 06:25 AM
i need to copy files from one folder to another folder using shell anurupr Linux - Newbie 17 03-04-2010 09:07 AM
Home Jail Folder Structure like Gobolinux Directory Structure luispt Linux - General 3 07-26-2008 06:46 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:31 AM.

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