BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 13th, 2002, 09:14 AM
petey20 petey20 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 56 petey20 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 50 sec
Reputation Power: 7
User Accounts

Currently my FREBSD box has a single user account that I use to telnet into an then su to root to do administrative tasks.

I'm hosting a lot of websites and am now looking into giving ftp access for users to their directory. What I have it this

/usr/local/www

from here are each domain I host, so each users directory is in this www directory.

Every directory in the www directory has 755 permissions. I have created a test account and set the user's home directory to

/usr/local/www/whatever.com/newuser

/usr/local/www/whatever.com/ has 755 permissions and is owned by newuser and group newuser

The rest of the directories in www are owned by my original login account so one directory would look like this

drwxr-xr-x 11 pete pete 1024 Aug 19 17:09 residenceperfection.com

I FTP'd in under the new user and it brought me to /usr/local/www/whatever.com/newuser like I wanted, but I was able to change directories to /usr/local/www/ and even able to goto /usr/local/www/residenceperfection.com under the new user and download files. Now access is denied for uploading into these directories, but you can see the issue. A user could potentially download another client's website, or even worse config files for logging into their admin page with username's/passwords etc.

What I want to do is allow the user access to only their directory

(ie) /usr/local/www/whatever.com/newuser

and not be able to cd to /usr/local/www or at least not be able to access /usr/local/www/someoneelseessite.com

Is it just a permissions thing?? What should they be for /usr/local/www and /usr/local/www/sitename.com? (provided sitename.com is owned and in a diffrent group) Can I set the permissions low enough to where another user can't see it, but it doesn't effect if a web user can access the page?

Thanks!!

Petey

Reply With Quote
  #2  
Old September 13th, 2002, 09:22 AM
petey20 petey20 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 56 petey20 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 50 sec
Reputation Power: 7
I've set the permissions on

/usr/local/www/sitename.com to 711 or drwx--x--x, this gives access to the webpage through the web, but denies access to any other user other than the one that owns it.

Is this correct??

Petey

Reply With Quote
  #3  
Old September 13th, 2002, 04:23 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
No, don't chmod 711, stick with 755, else it's pretty useless with 711 as they are tons of things you can't do.
For the ftp problem create a /etc/ftpchroot file then add the username one per line.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > User Accounts


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway