LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-11-2007, 02:44 AM   #1
canuck_dude
LQ Newbie
 
Registered: Jan 2007
Distribution: Fedora Core 6
Posts: 8

Rep: Reputation: 0
Samba Webserver Share


Hey,

I'm trying to setup a samba share to the DocumentRoot of the apache webserver so that I can work with the files on the webserver from a windows machine.

I've already setup samba and apache separately and they work fine. I added a samba share to /var/www/html and set everything to writable. I chmod 777 /var, /var/www, and /var/www/html so there can't be anything wrong with the permissions.

When I try to access the share a password dialog box pops up and no username/password will access the share. I've searched everywhere but can't figure out is happening. Any suggestions? Plus while we're on the subject, how should the file permissions be set for the /var/www/html directory if its a samba share as well?

Thanks!
 
Old 01-11-2007, 03:12 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
How about if you force the user in Samba?
 
Old 01-11-2007, 04:00 AM   #3
canuck_dude
LQ Newbie
 
Registered: Jan 2007
Distribution: Fedora Core 6
Posts: 8

Original Poster
Rep: Reputation: 0
That doesn't affect it at all...
 
Old 01-11-2007, 09:54 AM   #4
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
When you samba in, it is looking for a samba username and password. That isn't your usual name and pass that you use to sign into the box, it is a completely seperate set of credentials. You need to specifically add a samba user account to the machine.

Another option is to allow samba to operate without asking for a password.

An even better option is not to do things the way you are, as that is hyper unsecure. 777 Permissions is just asking to get rooted. The "safe" way to make something like that to work is to go into the apache configs and allow apache to run websites out of home dirctories. That way each site has its own home directory, and since it is in a home directory, you'l have write permissions there.

Peace,
JimBass
 
Old 01-11-2007, 11:20 AM   #5
canuck_dude
LQ Newbie
 
Registered: Jan 2007
Distribution: Fedora Core 6
Posts: 8

Original Poster
Rep: Reputation: 0
That's a great idea, but whenever I have done that in the past I have to access the sites by http://192.168.1.100~user. How do I make that user site the default one so I can access it simply with http://192.168.1.100?

What should I set the permissions for the public_html folder and the html files inside? When I set this up this morning I got a 403 Forbidden error when trying to access the ~user site.
 
Old 01-11-2007, 12:13 PM   #6
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
The apache.conf file needs to have home directoroy websites enabled. By default it is not. For permissions, I would just make certain that the 3 user class, other, have read and execute permissions. The public_html should probably be either 775 or 755.

You can probably get around the location name with aliases or symlinks, although I'm not sure. Is there only one website on the machine?

Peace,
JimBass
 
Old 01-11-2007, 04:31 PM   #7
canuck_dude
LQ Newbie
 
Registered: Jan 2007
Distribution: Fedora Core 6
Posts: 8

Original Poster
Rep: Reputation: 0
Yeh there is only one website hosted by the server...
 
  


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
can't mount samba share and then write to the share calbazon Linux - Software 8 10-10-2010 02:35 AM
searching samba share breaks connection to share Elomis Linux - Server 1 05-11-2007 01:28 AM
samba: linux mounted share = choppy playback, windows mounted share = smooth kleptophobiac Linux - Software 2 04-10-2005 09:23 AM
Simple Samba Setup, Share & Not Share timmywo Linux - Software 4 07-30-2004 08:27 AM
Samba share - network name no longer available when browsing samba from win2k dorango Linux - Software 0 03-02-2004 02:02 PM


All times are GMT -5. The time now is 08:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration