LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Creating a webserver (https://www.linuxquestions.org/questions/linux-networking-3/creating-a-webserver-144174/)

marghorp 02-09-2004 04:15 PM

Creating a webserver
 
Hi!

I have installed RH9 on a machine and use it for a server. Everything works great (HTTP, FTP, MYSQL, PHP, SSH, ...)

So now I am wondering:

1. How do I restrict users connecting to FTP only to be able to browse in their user directories?

2. How do I get mysql to connect only with password? Now it doesn't want to connect if I use password.

3. How do I assign rights to newly created directories and files that users create in their user directories?

Thanks for the help!

Marghorp

lone_nut 02-09-2004 04:25 PM

Answer to question 3 use the command chmod to change permisions and the command chown to change the group and owner of the file. to learn more about this issue, type man chmod

Welcome to the free world.

marghorp 02-10-2004 04:01 AM

Chmod works
 
I used chmod before, but it is rather slow to change files attributes. But anyway, ok it works. What does chown do? It sets the owner of the file, but what does that mean, why is it different if it says user instead fo root?

Ok that brings me to the second question.

My MySQL database is not behaving as it should. I can't connect to it from a remote computer. It says this "my IP" is not allowed to connect to "my servers IP". And on my computer I have to connect to MySQL only with the command mysql, because otherwise it says can not connect (user = bla bla)(password = YES). Connecting wtihout username and password works great, but that is not what I want to do.

Some help would be great!

GraemeK 02-10-2004 06:57 AM

i never worked it out... when i applied a pass to the database it wouldnt allow me in! got the same error as your getting. personally it doesnt make any differance to me but it would be nice to have the option. in the end i was forced to scrap the install and start again to fix it... if you find out please email me and let me know :D

cheers

kubicon 02-10-2004 07:40 AM

this is actually in the mysql manual, but this is not a RTFM posting. You'll just be able to get better info there.

anyways, you should manually set the the host in mysql.user table that you want to connect from. Something like this

host | user | password
--------------------------------------------------------------------------------------------------
somehost.atyourdomain | username | fhgyroepd07gkekmg
otherhost.atyourdomain | username | fhgyroepd07gkekmg

notice that you can have multiple hosts mapped to the same username

AfterBurn 02-10-2004 08:57 AM

to restrict people just change the permissions so that only admins can see the whole system and that only a user can see his home directory. have it make a group for each user and give only the user and admin read/write access.


All times are GMT -5. The time now is 05:44 AM.