allow users to edit /var/www/html/someFile
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
You can make them the owner or add their group to the folder you want them to edit.
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
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
what are the permissions of the folder? The "other" group should have read access
Yes, all groups have read access
> 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 126.96.36.199] 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.
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
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
chcon -R -h -t httpd_sys_content_t /var/www/html/adam (substitute dir path)
Ref : SELinux Security Context File Labels
OOPs ! I read 403 when 404 was asked, but the link given may provide answer
|All times are GMT -5. The time now is 06:00 AM.|