LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 03-19-2007, 09:33 PM   #1
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 272

Rep: Reputation: 30
allow users to edit /var/www/html/someFile


Hey all,
Been working with apache for a while now, but As long as I have been creating web site, ive been logging onto my site, and then as root editing all my /var/www/html/WEBSITE files.
NOw I have the need to add users to the system, and allow them to edit their own web content (/var/www/html/USER/). Figure to have them SSH in and edit.

Ive tried linking this file to their own home directory.

Any idea how to get this working?

THanks so much in advance
 
Old 03-19-2007, 10:11 PM   #2
merize147
Member
 
Registered: Oct 2004
Location: Where ever I put down Lappie
Distribution: Dragged kicking and screaming to RHEL
Posts: 132

Rep: Reputation: 15
You can make them the owner or add their group to the folder you want them to edit.

account: user1
group: user01
/var/www/html/user1

Change owner: chown -R user1 /var/www/html/user1

Change group: chgrp -R user01 /var/www/html/user1

or both together: chown -R user1:user01 /var/www/html/user1
 
Old 03-19-2007, 10:23 PM   #3
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 272

Original Poster
Rep: Reputation: 30
hmm, good thinking. haha!

If I can ask another question.

THis folder that we just created for this user, I dont know why IM having trouble accessing the file from a browser. Im using Virtual hosting, not im using 2 other entried, and those work. But for some reason, this doesnt. I moded the folder adam, for permissions adam/adam

When in a browser, i type "IP/adam" I get a 404.
Anything im missing that you can see?


# <VirtualHost IP>
# DocumentRoot /var/www/html/adam
# ServerName www.URL/adam
# ServerAlias URL/adam
# </VirtualHost>


THANKS!!!!
 
Old 03-19-2007, 10:56 PM   #4
merize147
Member
 
Registered: Oct 2004
Location: Where ever I put down Lappie
Distribution: Dragged kicking and screaming to RHEL
Posts: 132

Rep: Reputation: 15
what are the permissions of the folder? The "other" group should have read access
 
Old 03-19-2007, 11:37 PM   #5
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 272

Original Poster
Rep: Reputation: 30
Yes, all groups have read access
 
Old 03-20-2007, 12:54 AM   #6
Sagebrush Gardener
LQ Newbie
 
Registered: Mar 2007
Posts: 29

Rep: Reputation: 15
> I get a 404.

Check your error_log for the "File does not exist" message. It should tell you the full path of the file that it can't find. Something like this...

[Mon Mar 19 01:39:40 2007] [error] [client 1.2.3.4] File does not exist: /home/newweb/public_html/test/test.html

The file that Apache is looking for may not be the file that you think it should be looking for.

Last edited by Sagebrush Gardener; 03-20-2007 at 12:57 AM.
 
Old 03-20-2007, 08:34 AM   #7
MoMule
Member
 
Registered: Jul 2006
Posts: 134

Rep: Reputation: 15
Ability to update virtual websites

Here's a thought...

Set up ProFTP with single user access for that user to ftp into their own home directory.

create a link from a folder in their home directory pointing to the /var/www/html/<folder_to_be_worked_on>

I use this setup for all of my virtual hostings.

Deion "Mule" Christopher
 
Old 03-20-2007, 08:49 AM   #8
merize147
Member
 
Registered: Oct 2004
Location: Where ever I put down Lappie
Distribution: Dragged kicking and screaming to RHEL
Posts: 132

Rep: Reputation: 15
Quote:
Originally Posted by blizunt7
# <VirtualHost IP>

Why are you setting up a virtual host? Is your doc root different then /var/www/html?

as long as your doc root is /var/www/html then the adam folder is just that a folder and can be accessed by adding it to the the end of the URL.

http://<ipaddress>/adam or if you can resolve the name http://<dns_name>/adam

.
 
Old 03-20-2007, 08:50 AM   #9
sn68
Member
 
Registered: Oct 2005
Distribution: FC5
Posts: 338

Rep: Reputation: 30
Quote:
Originally Posted by blizunt7
When in a browser, i type "IP/adam" I get a 404.
Anything im missing that you can see?
The problem could be SElinux policy, something to do with SELinux context labels, in such cases 403 error occurs even though permissions are correct when accessing through www because the context label was wrong
to configure
chcon -R -h -t httpd_sys_content_t /var/www/html/adam (substitute dir path)

Ref : SELinux Security Context File Labels
Edit:
OOPs ! I read 403 when 404 was asked, but the link given may provide answer

Last edited by sn68; 03-20-2007 at 08:53 AM.
 
  


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
index.html is not noticed in /var/www/html xviddivxoggmp3 Red Hat 1 04-23-2006 07:30 PM
help in /var/www/html/!! chidomen Linux - Newbie 4 01-13-2005 12:02 PM
should var/www/html be accessible to root only? linuxfond Linux - Newbie 1 09-06-2003 03:00 PM
ownership of /var/www/html haobaba1 Linux - Security 1 08-04-2003 03:58 PM
chmod of /var/www/html alTereD Linux - Security 1 12-16-2002 03:43 PM


All times are GMT -5. The time now is 08:54 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration