LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Samba Webserver Share (https://www.linuxquestions.org/questions/linux-newbie-8/samba-webserver-share-518271/)

canuck_dude 01-11-2007 01:44 AM

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!

billymayday 01-11-2007 02:12 AM

How about if you force the user in Samba?

canuck_dude 01-11-2007 03:00 AM

That doesn't affect it at all...

JimBass 01-11-2007 08:54 AM

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

canuck_dude 01-11-2007 10:20 AM

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.

JimBass 01-11-2007 11:13 AM

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

canuck_dude 01-11-2007 03:31 PM

Yeh there is only one website hosted by the server...


All times are GMT -5. The time now is 03:30 AM.