LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 10-11-2010, 05:05 AM   #1
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Rep: Reputation: 30
web page of each of the student


Dear friends,

I have a situation here.
Suppose there are 35 students in my class, and I am thinking of allowing each of them to host a web page, with full control to edit or add/delete the content - something like the below:

For Susan : http://localhost/Susan
For Jack : http://localhost/Jack
etc. etc.,

I am running apache web server with root directory as /var/www/html. Thus for each user a subdirectory in /var/www/html can be created. Now how can we give each of the users access to his or her directory.
Would we be required to create system accounts for each of them ?
Further, allowing them to add content to their directory would perhaps require some sort of ftp attangement ?

I think I am groping in dark.

Can any one guide me in this endeavour ?

Thanks in advance.


Prabhat Soni
 
Old 10-11-2010, 05:08 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
http://httpd.apache.org/docs/2.0/mod/mod_userdir.html
 
Old 10-14-2010, 12:56 AM   #3
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Original Poster
Rep: Reputation: 30
Sir,
This is driving me crazy. It should work, but on accessing "http://localhost/~guest/index.html" I keep getting

Quote:
Forbidden

You don't have permission to access /~guest/index.html on this server.
Even after increasing the log level in httpd.conf to "debug", I get only this log entry:
Quote:
[Thu Oct 14 02:04:58 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /~guest/index.html denied
Now for the configuration:
/home/guest has permissions of 711.
/home/guest/public_html has the permission of 775.
/home/guest/public_html/index.html has permissions of 664.

And in the /etc/httpd/conf/httpd.conf, I have
Quote:
<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
#UserDir disabled

# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disabled" line above, and uncomment
# the following line instead:
#
UserDir public_html

</IfModule>
I still don't know why I am getting "FORBIDDEN ....."

Please help.

Prabhat Soni
 
Old 10-14-2010, 09:19 PM   #4
mecelec415
Member
 
Registered: Jan 2008
Location: Noble Park ,Victoria, Australia
Distribution: Mageia
Posts: 183
Blog Entries: 2

Rep: Reputation: 23
why not look at a content mangament system like word press or simular
http://codex.wordpress.org/Create_A_Network

Last edited by mecelec415; 10-14-2010 at 09:29 PM.
 
Old 10-15-2010, 03:40 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Host headers?
 
Old 10-15-2010, 11:38 PM   #6
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Original Poster
Rep: Reputation: 30
Sir,
Would you please be a little elaborate.

Prabhat Soni
 
Old 10-20-2010, 05:34 AM   #7
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Original Poster
Rep: Reputation: 30
Hello,
It seems my message has somehow escaped attention.
So, here I'm; once again making a request for help.

Thanks in advance.

Prabhat Soni
 
Old 11-07-2010, 08:58 AM   #8
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
Quote:
Now for the configuration:
/home/guest has permissions of 711.
/home/guest/public_html has the permission of 775.
/home/guest/public_html/index.html has permissions of 664.
Is the 711 a typeo? I tried to chmod to 711 on my Linux server and it failed.
Try making the permissions 755 for /home/guest and see if that helps.

ie: chmod 755 /home/guest
 
Old 11-08-2010, 02:24 AM   #9
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Original Poster
Rep: Reputation: 30
No it is not a typo.
And it is not working even after the change in the said permissions to 0755. In fact, it is the same "permission denied to ..."


Prabhat Soni
 
Old 11-08-2010, 06:17 AM   #10
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Original Poster
Rep: Reputation: 30
Ok folks, I have solved this.

It was selinux issue after all.
I changed selinux policy to "permissive" from "enforcing", and I am able to access the users' home directory.


Prabhat Soni
 
Old 11-08-2010, 07:02 AM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
whoops, read that response wrong. ignore.

Last edited by acid_kewpie; 11-08-2010 at 07:03 AM.
 
Old 11-09-2010, 03:30 AM   #12
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Original Poster
Rep: Reputation: 30
Ok friends, but now the problem is "how to make it work with the selinux policy being at 'enforcing' instead of 'permissive'.

It was indicated in the selinux warning concerning this access (to the web page) that the context should be "httpd_user_content_t" in place of "user_home_t". Even after incorporation of this change (and rebooting) it was same - "permission denided....".

Any help friends ?


Prabhat Soni
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
executing linux commands from web page and outputing it back to the web page ashes_sheldon Programming 9 02-28-2015 12:07 AM
web server for student kmack1023 Linux - Security 3 09-22-2007 01:45 AM
web page database access per page or per session? b0uncer Programming 6 01-13-2007 12:09 PM
Jerky mouse when web browsers download web page stodge Linux - Software 1 07-08-2003 10:29 PM
Please help a college student on assignment. Need web page designers opinions. Pcghost General 4 03-10-2003 04:00 PM

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

All times are GMT -5. The time now is 07:35 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