The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 Questions from Beginner
Author: tjhilder 
Date:   04-03-05 03:54

I have a few questions, tried doing a search but couldn't find what I was looking for.

My questions are:

1. how to limit webspace for different users.
2. how to stop users being able to view all files on server.
3. how to limit bandwidth for different users.

I'm sure i'll find more questions later, but would really like some help with these. :)

Regards
TJ

freebsd Fan :D

Reply To This Message
 
 Re: Questions from Beginner
Author: tjhilder 
Date:   30-03-05 01:17

no replies? :(

Reply To This Message
 
 Re: Questions from Beginner
Author: core_dumped 
Date:   31-03-05 18:17

1. how to limit webspace for different users.
use a proxy with authenticated access.

2. how to stop users being able to view all files on server.
be more specific. what server ?

3. how to limit bandwidth for different users.
squid proxy has a feature (delay pools) that controls the bandwith usage which is very powerful.



cheers

Reply To This Message
 
 Re: Questions from Beginner
Author: tjhilder 
Date:   31-03-05 19:30

2. at present, any account can view all the files on my FreeBSD webserver, but unless on a particular access, can't do anything to them, I want to make it so they can't see any files but their own.

Is there a step by step instructions on all 3 of my questions around here somewhere? I'm new and don't know much about FreeBSD.

Regards
TJ

Reply To This Message
 
 Re: Questions from Beginner
Author: core_dumped 
Date:   01-04-05 12:23

There are good tutorials to install squid on net.
Search on google, but i suggest you read squid documentation before.

www.squid-cache.org

The page contains links to good tutorials as well.

2. at present, any account can view all the files on my FreeBSD webserver, but unless on a particular access, can't do anything to them, I want to make it so they can't see any files but their own.

On FreeBSD, when you install apache (are you using it, right?) the owner of files is the www user. Just change permissions and only this user will list, read and write on this dir:

/usr/local/www - this is the dir where html files are placed by apache

chmod -R 700 /usr/local/www/

This command will permit full control to owner of dir and will deny any kind of access (list, read or write) to other users except root user, of course.

Reply To This Message
 
 Re: Questions from Beginner
Author: tjhilder 
Date:   02-04-05 04:24

Ok i tried the "chmod -R 700 /usr/local/www/" that you suggested, but I can still look at any file on my FreeBSD webserver using ftp, (with a differnt account) this isn't what I was wanting, I want the same effect you get when say... you use FTP to get on freedom2surf ftp account, all it shows is my tjhilder.f2s.com folder and when clicked on, see my files, but if i try to go up a directory instead of into tjhilder.f2s.com folder, it won't allow it, this is the same effect I want on my server, so that my friends accounts can see their folder and nobody elses.

any ideas? a step by step instruction tutorial would be handy right about now.

Reply To This Message
 
 Re: Questions from Beginner
Author: Erin 
Date:   02-04-05 13:18

tjhilder wrote:

> 1. how to limit webspace for different users.

This can be done with quotas.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/quotas.html


> 2. how to stop users being able to view all files on server.

Don't give them shell access. Use an FTP server that supports chrooting. I user pure-ftpd.

You can have shell access for users if you chroot them. Remember this, most ISP/Web hosts don't give shell access to users unless they have big accounts.


> 3. how to limit bandwidth for different users.

I wish I knew an easy way to do this. I do know you can use IPFW and a dummy_net to do this, but if you are going to host many sites on a single IP, this will not cut it. People have written modules for Apache (i.e. mod_bandwidth) to keep track of the bacdwidth being used be the clients. With some scripting you could limit the total bandwidth being used, but not the current bandwidth.


-Erin

Reply To This Message
 
 Re: Questions from Beginner
Author: tjhilder 
Date:   02-04-05 20:00

Hi,

how do I deny them shell access? my brother thinks you change their shell to none, is this correct? i'm not very good at searching for stuff tho (or at least thats my opinion)


TJ

Reply To This Message
 
 Re: Questions from Beginner
Author: Erin 
Date:   03-04-05 03:58

/sbin/nologin will not allow shell access.

You may want to give this a try first, I believe with the stock FTP server /sbin/nologin will not allow you to FTP to the server.


-Erin

Reply To This Message
 
 Re: Questions from Beginner
Author: tjhilder 
Date:   03-04-05 04:58

you say if I do that, i won't be able to login to the server? well that isn't exactly going to help me if thats what you meant lol

Reply To This Message
 
 Re: Questions from Beginner
Author: Erin 
Date:   03-04-05 17:34

You are going to need a BASIC understanding of UNIX if you are going to host web sites on it.

Don't test on your own account... Create another for the testing.


-Erin

Reply To This Message
 
 Re: Questions from Beginner
Author: tjhilder 
Date:   30-04-05 11:29

could you give me some sort of step by step on the shell access thing, i know how to create an account, what do I do after that? or is there a documentation on this?

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org