LinuxQuestions.org
Visit Jeremy's Blog.
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 08-30-2012, 01:07 PM   #1
manya
Member
 
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
/dev/random
Member
 
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---
Code:
chmod -R 750 /home/*
The files under those directories should be rwx-r----
Code:
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.
Code:
chmod 700 /path/to/file
 
  


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
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

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

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