LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-22-2002, 02:39 AM   #1
rlculver
Member
 
Registered: Mar 2002
Location: Kent, United Kingdom
Posts: 56

Rep: Reputation: 15
Exclamation Help :)


Hi there all,

I need some advice for one of the assignments I am undetaking at present

Okay - What do I need to configure in order to carryout the following :-

Provide a users with access to there default public_html directory within there homes and to provide access to say the htdocs area on main apache server.

Another user may be only permitted use to there public_html directory and nothing else.

While another user may be permitted access to everything (root).

how can this be done - Do I need to configure Linux, Apache or proftpd????

Cheers

NOTE - They need to be able to download and upload files to there associated directories.
 
Old 03-22-2002, 10:49 AM   #2
Sixpax
Member
 
Registered: Mar 2002
Distribution: Mandrake 8.1
Posts: 386

Rep: Reputation: 31
You can do all of that with samba and the users can just map network drives to those directories.
 
Old 03-23-2002, 09:40 PM   #3
jester13rok
LQ Newbie
 
Registered: Mar 2002
Distribution: Debian, Redhat
Posts: 6

Rep: Reputation: 0
proftp

If your users need access via ftp, you need to edit the proftpd.conf file.
I read something simiar to what you wanted, just can't remeber where...I think it was somewhere in:
http://www.proftpd.org/docs/

good luck
Jason
 
Old 03-26-2002, 05:02 PM   #4
nejoom
LQ Newbie
 
Registered: Mar 2002
Location: Holland
Distribution: RH
Posts: 15

Rep: Reputation: 0
httpd / ftp

Some definitions:

htdocs: the directory where apache keeps its html files
public_html: the directory where apache keeps its html files

note both names do the same thing and are located on the computer apache is running on: the webserver.

Some distros use htdocs (bsd) others public_html (RH)

If you want to provide access from within there own homes, Im assuming there home isn't located in the same network of the server, so you got to set up an ftp (for file transfers) server. That way they can send there files over the internet.
You dont want to do samba over the internet (isnt safe), but the are some ner protocals out there safer than ftp. But wont go into details here.

Never give shell access to users. (isnt safe) unless you know what your doing.

If you want root to access everything set up an ssh server (secure shell sever, encrypted).

Root should never transfer files over the internet (isnt safe). Why not just set up a normal user which can transfer files with ftp, and then ssh (secure shell) to the server to move the files after they've been transfered. This is safer.

So the strategy would be:
Set up ftp for normal users,
Set up ssh deamon (server) for a select group of users you trust (+ root)
Set up apache to serve html pages for more than one domain (users) (http server=html server= webpage server).
Set up ftp for normal users to transfer files (+one non root user)

Difficulty:
ssh is simple to set up. download the latest ssh rpms from rpmfind.net (if your on RedHat)
rpm -ivh openssh-server-*.rpm openssh-3*.rpm openssh-clients-*.rpm
get an ssh client for windows at tucows.com (search for putty)

setup ftp:
A good ftp server seems to be proftpd. But its not
a default package for redhat. So it needs alot of configuring.
again from rpmfind.net

---------------
rpm -ivh proftpd-1.2.5*.i386.rpm
--------------

you can download mine from (uses anonymous login and normal users go directly to there home directory without seeing anything else):
-----------
wget http://test.tinyelements.com/downloads/proftpd.conf

# Make it secure
cp proftpd.conf /etc/proftpd.conf
chmod 644 /etc/proftpd.conf

# The rpm doesn't have a start script!
wget http://test.tinyelements.com/downloads/proftpd
chmod 755 /etc/init.d/proftpd
/sbin/chkconfig --add proftpd #add it to start at boot!

---------------
vi/ pico the things you downloaded so you can check out what its doing.

make an httpd.conf that allows for multiple domains (more than one website, an example you can download, its the NameVirtualHost part so search for that in the file to see what im doing setup for a user named eddie and one named robert, both with there own site):
wget http://test.tinyelements.com/downloads/httpd.conf

Set up a dns server to point to the domains defined, very difficult if your not an advanced user (or for testing change the client hosts files located in /etc on linux or c:/winnt/system32/drivers/etc on windows on the client side, to map the domains eddie.mydomain.com to the ip number of the apache server) (where your internet explorer/ netscape/ konquerer is running on = client, where apache is running = server)

add web users defined in httpd.conf with the following commands:

------------------------

# set up a user with home directory and description: email
adduser robert -d /home/websites/robert.mydomain.com -c robert@mydomain.com #one line

# make the correct directories
mkdir /home/websites/robert.mydomain.com/public_html
mkdir /home/websites/robert.mydomain.com/logs

chmod -R 750 /home/websites/robert.mydomain.com/logs #(make logfiles immutable for rest of world)
#dont allow user to shell into server
chsh robert /sbin/nologin

#finally make public_html owned by robert
chown -R robert.robert /home/websites/robert.mydomain.com/public_html

---------------------------------------

Anyways this is how ISP's do it.

hope it helps.
 
  


Reply



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



LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:27 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
Open Source Consulting | Domain Registration