LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-10-2010, 11:38 AM   #1
nibau
LQ Newbie
 
Registered: Aug 2010
Location: Portugal
Distribution: CentOS, Fedora
Posts: 19

Rep: Reputation: 0
apache and samba shares


hi there!
i want to access to my samba shares index (or contents) trough http.

something like this: http://mysambaserver/public/, and it lists the public share contents

i read something about aliases...i wrote this in the httpd.conf:

Code:
Alias /public/ "/mnt/public/"
      <Directory "/mnt/VAS/storage/public">
      Options Indexes MultiViews
      AllowOverride None
      Order allow,deny
      Allow from all
      </Directory>
but it won't work!

thank you so much!
 
Old 08-10-2010, 11:57 AM   #2
HasC
Member
 
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329

Rep: Reputation: 55
Quote:
Originally Posted by nibau View Post
hi there!

Code:
Alias /public/ "/mnt/public/"
      <Directory "/mnt/VAS/storage/public">
why do you declare first "/mnt/public" and later "/mnt/VAS/storage/public"? which one contains your samba share?
 
1 members found this post helpful.
Old 08-10-2010, 11:58 AM   #3
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
Firstly it would help if the alias pointed to the same place as the Directory directive.
Secondly, the desired directory must be world readable (755).
 
1 members found this post helpful.
Old 08-10-2010, 12:38 PM   #4
nibau
LQ Newbie
 
Registered: Aug 2010
Location: Portugal
Distribution: CentOS, Fedora
Posts: 19

Original Poster
Rep: Reputation: 0
hi there and thank you both!
you two are absolutely right...my mistake (i think) while writing the post...the share is /mnt/VAS/storage/public.

well, at work i have this virtual machine running samba and apache. Now i'm at home and i can't tell if i wrote it wrong here or in the httpd.conf file:/ humm....

so, while i don't get back to work (tomorrow ) this code should work

Code:
Alias /public/ "/mnt/VAS/storage/public/"
      <Directory "/mnt/VAS/storage/public/">
      Options Indexes MultiViews
      AllowOverride None
      Order allow,deny
      Allow from all
      </Directory>
with public being world readable... right?

tomorrow i'l post here if i made it!
thank you both
 
Old 08-10-2010, 01:29 PM   #5
SciFi-Bob
Member
 
Registered: Aug 2008
Location: Denmark
Distribution: Ubuntu
Posts: 62

Rep: Reputation: 18
I could not resist to post this.

If you are somewhat concerned of who accesses your "public" directory, then try this:
Code:
htpasswd -c /.mypasswordfile guest
Fill in the password when prompted.

Put this in your site file, inside the Directory tag:
Code:
AuthType basic
AuthName "My public shares"
AuthUserFile /.mypasswordfile
Order allow,deny
require user guest
satisfy any
Of course, .mypasswordfile may reside anywhere on your disk, but it has to be readable from the apache service account.
 
1 members found this post helpful.
Old 08-10-2010, 02:08 PM   #6
nibau
LQ Newbie
 
Registered: Aug 2010
Location: Portugal
Distribution: CentOS, Fedora
Posts: 19

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by SciFi-Bob View Post
I could not resist to post this.

If you are somewhat concerned of who accesses your "public" directory, then try this:
Code:
htpasswd -c /.mypasswordfile guest
Fill in the password when prompted.

Put this in your site file, inside the Directory tag:
Code:
AuthType basic
AuthName "My public shares"
AuthUserFile /.mypasswordfile
Order allow,deny
require user guest
satisfy any
Of course, .mypasswordfile may reside anywhere on your disk, but it has to be readable from the apache service account.
hi there!

so i should substitute the other stuff i had inside "Directory" with this you posted, right?

thank you!
 
Old 08-11-2010, 03:44 AM   #7
nibau
LQ Newbie
 
Registered: Aug 2010
Location: Portugal
Distribution: CentOS, Fedora
Posts: 19

Original Poster
Rep: Reputation: 0
problem solved! thank you all!!!
 
  


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
RHEL 5.3 Samba DR Restore - Permissions Screwy on Samba shares mudman69 Red Hat 3 05-12-2009 10:56 AM
can not access samba shares from a VIRTUAL samba server using smb4k nass Fedora 0 12-13-2008 04:39 AM
Samba commander delete denied on samba shares moisvon Linux - Software 0 01-28-2008 02:54 PM
Apache subdomains like Samba home-shares toffi22 Linux - Software 1 01-30-2005 07:16 PM
Linux can mount samba shares but not windows shares bindsocket Linux - Software 1 12-01-2003 05:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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