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 01-17-2013, 02:56 AM   #1
slowerogue
Member
 
Registered: Oct 2012
Posts: 93

Rep: Reputation: Disabled
vstfp jail issue


hi guys, i have set up a vsftpd jail and it works OK
i jail them by setting the sshd_config

Code:
match group xxx  
X11Forwarding no
ChrootDirectory %h
AllowTcpForwarding no
ForceCommand internal-sftp
let say user1, homedir= /data/group1
user2, homedir= /data/group2
user3, homedir= /data/group1
user3 is same group with user1, so their home directory will be the same, and will be jailed under the same directory.
ls -l
rwxr-xr-x root root group1
rwxr-xr-x root root group2
i can use user1,2,3 winscp and it will jail under their directory.
the jail issue works perfectly, until i need to create another group call operator, where the operator will need to access and edit whatever he needs

so i setfacl -R -m gperator:rwx *
now ls -l
drwxrwxr-x+ root root group1,group2

now the operator can do whatever he wants, but the vsftpd jail function no longer works.
when i winscp, it will says software error.
if i remove the w permission for the operator group
make the directory becomes
rwxr-xr-x root root group1, then the jail function works again, but the operator will not have any write permission anymore


how can i have the operator group to have full permission, while the jail functions work together
 
Old 01-17-2013, 06:14 AM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,686
Blog Entries: 23

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
user3 is same group with user1, so their home directory will be the same, and will be jailed under the same directory.
That right there is a possible issue. Better to make a symlink from the one to the other instead...

Quote:
the jail issue works perfectly, until i need to create another group call operator, where the operator will need to access and edit whatever he needs
Go ahead and create that user, set up a symlink per folder that this user needs to access and grant the required privzz (read/write/execute)...

An example (but...you possibly already know this...) to make a link and grant read access...

Quote:
ln -s /data/group2 group2
chmod +r group2
By the way, why are the users in the data folder and not in the home folder? But, just curious here

Good luck

Thor
 
Old 01-17-2013, 11:42 PM   #3
slowerogue
Member
 
Registered: Oct 2012
Posts: 93

Original Poster
Rep: Reputation: Disabled
Why I need to create symlink, I wan to lock them under same directory
The user doesn't hv any home folder, thier directory is data/$group

Btw I hv solved, just need to created another sub directory
 
Old 01-18-2013, 04:03 AM   #4
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,686
Blog Entries: 23

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
Btw I hv solved, just need to created another sub directory
Good! And thanks for sharing the solution

Mark this as solved, okay?

Greetzz!

Thor
 
  


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
ssh jail issue slowerogue Linux - Newbie 3 01-02-2013 11:24 PM
[SOLVED] Jail suggestions Cyrolancer Linux - Server 12 02-07-2012 06:42 PM
[SOLVED] Chroot jail or Root jail bayprince Linux - Newbie 3 07-25-2011 08:43 PM
[SOLVED] chroot jail problem: 'empty' jail MatrixS_Master Linux - Security 4 03-27-2010 07:25 AM
Jail? Hoops66 *BSD 1 09-11-2003 07:45 AM


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