LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-08-2003, 09:05 AM   #1
ignavus
LQ Newbie
 
Registered: Jul 2003
Location: Tromso, Norway
Distribution: Slackware
Posts: 5

Rep: Reputation: 0
user homepages


Might be that this thread should've been posted under the newbie-section, but I'll give it a go here anyway.

I'm running a computer with slackware 9.0 on our local network (no inet, which is a problem I'll get to another time), meant to serve ftp and web (http/php, etc). I've created a test-account, with its own home-area (home/test1), and I want this user to have an area in this directory that can be used as a public_html-area - accessible from other computers on the network as "slackware-server/test1" through the http-protocol. How do I do this?

I've read several different faq's both on LQ and the respective homepages of the software-distributors - Apache and Slackware - but I haven't found anything regarding the subject. The closest I got was the faq on vhosts on the apache-site, but I'm not sure if that's what I'm looking for.

Any help will be appreciated, thank you.


And btw, the server is already responding through http as a newly installed apache-server, so I know it's working as it should. Installation also includes both MySQL and PHP, which both work perfectly.
 
Old 08-08-2003, 09:17 AM   #2
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
well if you just want to share the files,nfs would suffice but I don't think that is what you are looking for ,you should configure your apache server ,set up networking and you're done,if that is what I read from your query!
Correct me if i'm wrong?
How to do that ?
Aren't the apache manuals enough?
 
Old 08-08-2003, 09:36 AM   #3
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
As already mention nfs/samba might be more suitable for sharing files, however to answer the question.

Create public_html under /home/test1. Check that the following is in your httpd.conf
Code:
<IfModule mod_userdir.c>
    UserDir public_html
</IfModule>
Restart apache as necessary (clearly you'll need mod_userdir available but this is on by default). Put some files in /home/test1/public_html. Access http://server/~test1

HTH & welcome to LinuxQuestions

Jamie...

Last edited by jharris; 08-08-2003 at 09:37 AM.
 
Old 08-08-2003, 11:02 AM   #4
ignavus
LQ Newbie
 
Registered: Jul 2003
Location: Tromso, Norway
Distribution: Slackware
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by jharris
As already mention nfs/samba might be more suitable for sharing files, however to answer the question.


The samba-part could be interesting (it's a windows-network btw, so I guess it would have to be samba in that case), but I've had difficulties setting up samba before, and I figured it would be faster to just setup and use ftp for this purpose.



Quote:
Create public_html under /home/test1. Check that the following is in your httpd.conf
Code:
<IfModule mod_userdir.c>
    UserDir public_html
</IfModule>
Restart apache as necessary (clearly you'll need mod_userdir available but this is on by default). Put some files in /home/test1/public_html. Access http://server/~test1


I tried just creating the public_html-folder inside the /home/test1 -folder, but I couldn't browse to the index- and php-files I put in there from the windows-computer. Hopefully it will work when I add the lines you mention above here, unless they are included by default..? I haven't tampered alot with the httpd.conf included with the slackware 9.0 installation, but I'll have to check it out on monday - can't reach the linux-comp from here, as it's located at work.


Thanks for all the help anyway, I'll get back to this as soon as I can
 
Old 08-08-2003, 11:04 AM   #5
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Check the permissions on the files (644), the permissions and the permission on your /home /home/temp1 and /home/temp1/public_html directorys (711, 711, 755 respectively). Also check that Indexes are allowed on your apache server.

cheers

Jamie...
 
Old 08-11-2003, 03:45 AM   #6
ignavus
LQ Newbie
 
Registered: Jul 2003
Location: Tromso, Norway
Distribution: Slackware
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by jharris
Check the permissions on the files (644), the permissions and the permission on your /home /home/temp1 and /home/temp1/public_html directorys (711, 711, 755 respectively). Also check that Indexes are allowed on your apache server.

Now I have a home-dir called test1, that contains the public_html-subdir, with an index and a phpinfo-file.

I'm not sure about how to set permissions and stuff, so it would be great if you could just give me some insight in to how it's done (chmod / chown ?)

The settings in the httpd.conf seems alright, although I'm not sure about the part on allowing indexes either.
 
Old 08-11-2003, 04:11 AM   #7
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Quote:
Originally posted by ignavus
I'm not sure about how to set permissions and stuff, so it would be great if you could just give me some insight in to how it's done (chmod / chown ?)
Yeah thats right, chmod. So something like chmod 755 /home would allow the owner of /home (hopefully root!) to read write or execute the directory and everyone else to just read and execute. Have a read of the following for an explination of file permissions http://math.bnu.edu.cn/Ebook/OR_Prac...y/ch05_01.html
Quote:
Originally posted by ignavus
The settings in the httpd.conf seems alright, although I'm not sure about the part on allowing indexes either.
If you look in your httpd.conf file you'll seen lines (typically with a <Directory ..></Directory> block) that say things like
Code:
Options FollowSymLinks Indexes
The indexes option means that if you went to http://someServer/someDir/ and the someDir directory didn't contain an index.html file then the Apache server will return a listing of the contents of the directory. If this option wasn't present then the Apache server would tell you that you didn't not have permissions to view the directory.

That make things a little clearer?

cheers

Jamie...
 
Old 08-11-2003, 06:56 AM   #8
ignavus
LQ Newbie
 
Registered: Jul 2003
Location: Tromso, Norway
Distribution: Slackware
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by jharris
That make things a little clearer?

Absolutely, and thanks for the useful info

Somehow I managed to make the test1-page work as well, but I'm not sure how I did it. Might be that it had something to do with the permissions, but it seems okay now.

Thanks again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Load kde profile from /mnt/removable/user instead of /home/user preacher.ca Linux - General 3 12-02-2005 03:00 PM
Samba -- XP user can log in to shares but smbclient user always gets password errors ejoe Linux - Software 3 04-18-2005 10:55 AM
grant user access to /fat-c & copying users' preferences to another user n0x Linux - Newbie 1 07-04-2004 12:04 AM
Couldn't get access to most homepages after mandrake update wiggywag Mandriva 1 09-03-2003 06:20 AM
Pleasehelp with proftpd.conf - trying to config user to write files as other user. philg Linux - Software 1 06-21-2003 12:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:18 PM.

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