#1  
Old 24th December 2008, 20:10
newmember newmember is offline
Junior Member
 
Join Date: Dec 2008
Posts: 19
Thanks: 0
Thanked 1 Time in 1 Post
Default chroot and folder permissions

This was kind of interesting, I added chroot to my sshd.
And I changed my Management->System Config->User Prefix: to user[WEBID]_ from web[WEBID]_.

Now when I create a new user I get a folder:

Code:
/var/www/web15/user/user15_chrisw/
and in this folder I get all the standard folders. What is interesting is that all the folders in that directory are owned by root and not user15_chrisw or group web15.

It was just interesting, I noticed that I was uploading files to what I thought was my website:

Code:
/var/www/web15/web
but I was actually uploading them to
Code:
/var/www/web15/users/user15_chrisw/web

Code:
root@server-isp:/var/www/web15# ls -l
total 24
drwxrwxr-x 2 root web15 4096 2008-12-23 20:26 cgi-bin
drwxr-xr-x 2 root web15 4096 2008-12-23 20:26 log
drwxrwxrwx 2 root web15 4096 2008-12-23 20:26 phptmp
drwxr-xr-x 2 root web15 4096 2008-12-23 20:26 ssl
drwxr-xr-x 3 root web15 4096 2008-12-23 21:13 user
drwxrwxr-x 3 root web15 4096 2008-12-23 20:26 web


Code:
root@server-isp:/var/www/web15# ls -l user/
total 4
drwxr-xr-x 11 user15_chrisw web15 4096 2008-12-23 21:18 user15_chrisw
Code:
root@server-isp:/var/www/web15# ls -l user/user15_chrisw/
total 32
drwxr-xr-x 2 root          root  4096 2008-12-23 21:13 bin
drwxr-xr-x 2 user15_chrisw web15 4096 2008-12-23 21:18 chrisw
drwxr-xr-x 2 root          root  4096 2008-12-23 21:13 dev
drwxr-xr-x 4 root          root  4096 2008-12-23 21:14 etc
drwxr-xr-x 4 root          root  4096 2008-12-23 21:14 lib
drwxr-xr-x 4 root          root  4096 2008-12-23 21:13 usr
drwxr-xr-x 3 root          root  4096 2008-12-23 21:14 var
drwxrwxr-x 2 user15_chrisw web15 4096 2008-12-23 22:58 web
Reply With Quote
Sponsored Links
  #2  
Old 24th December 2008, 20:41
newmember newmember is offline
Junior Member
 
Join Date: Dec 2008
Posts: 19
Thanks: 0
Thanked 1 Time in 1 Post
Default

I was looking at this again and I am wondering if this is standard set up for ISPconfig? If it is I could actually use it for a few projects.

The downside to this that when I create a user I have to edit the User and Groups to move the home directory in line with the website's root directory. That way the users can all edit the same website, not a 'user' sub folder.

You want typically everyone to edit the same folders when they log in:

Code:
/var/www/web15/web
With this each user edits their own folders:

Code:
/var/www/web15/users/user15_chrisw/web
I have to change the user's default directory by editing the server user settings.
I think this might be bad as ISPconfig would not know about the change, when future ISPconfig updates or changes have to be made to the account and things get over written.





Thanks

Last edited by newmember; 24th December 2008 at 20:53. Reason: More Info
Reply With Quote
  #3  
Old 25th December 2008, 12:18
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
 
Default

http://www.howtoforge.com/forums/showthread.php?t=29743
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
chroot and file permissions newmember Installation/Configuration 3 31st December 2008 14:03
Improper use of CHROOT enviroment X secure file transfer between customer and admin. adrenalinic Installation/Configuration 1 21st December 2008 22:48
Multiples Chroot Enviroment , each account for each admin adrenalinic Server Operation 0 21st December 2008 17:57


All times are GMT +2. The time now is 17:32.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.