Networking Forums

Networking Forums > Computer Networking > Linux Networking > Samba share to www directory - stupid idea?

Reply
Thread Tools Display Modes

Samba share to www directory - stupid idea?

 
 
Randy Brick MacKenna
Guest
Posts: n/a

 
      10-13-2007, 02:28 AM
I've set up a Linux (openSUSE) machine in my home as a file server,
and Apache, visible on the internet with port forwarding through my
router. I also have a Samba server running on this machine.

Let's say I have a directory /srv/www/mysite that acts as the root
folder for my website www.mysite.net

If I also set up a Samba share for that directory with full read-write
access for a user on a WinXP client elsewhere on my network, am I
creating a security exposure for myself?

I want to be able to update files on the website by treating it as a
mapped drive on the WinXP client, since I do most of my website
development on that client.

Is this okay, or a bad idea?

Thanks,
Randy

 
Reply With Quote
 
 
 
 
David Brown
Guest
Posts: n/a

 
      10-13-2007, 10:51 AM
Randy Brick MacKenna wrote:
> I've set up a Linux (openSUSE) machine in my home as a file server,
> and Apache, visible on the internet with port forwarding through my
> router. I also have a Samba server running on this machine.
>
> Let's say I have a directory /srv/www/mysite that acts as the root
> folder for my website www.mysite.net
>
> If I also set up a Samba share for that directory with full read-write
> access for a user on a WinXP client elsewhere on my network, am I
> creating a security exposure for myself?
>
> I want to be able to update files on the website by treating it as a
> mapped drive on the WinXP client, since I do most of my website
> development on that client.
>
> Is this okay, or a bad idea?
>
> Thanks,
> Randy
>


It's a perfectly good idea, as long as you get the security right.
First off, you have to make sure that no one from outside can get into
the samba share - but I presume you've got that covered already from the
firewall protecting your network. Secondly, it's perhaps a good idea to
use samba to force the group and owner on the files so they are
consistent with what your web server wants to see, rather than the user
name and group that the windows client uses.
 
Reply With Quote
 
Randy Brick MacKenna
Guest
Posts: n/a

 
      10-13-2007, 12:18 PM
On Oct 13, 6:51 am, David Brown
<david.br...@hesbynett.removethisbit.no> wrote:
> Randy Brick MacKenna wrote:
> > I've set up a Linux (openSUSE) machine in my home as a file server,
> > and Apache, visible on the internet with port forwarding through my
> > router. I also have a Samba server running on this machine.

>
> > Let's say I have a directory /srv/www/mysite that acts as the root
> > folder for my websitewww.mysite.net

>
> > If I also set up a Samba share for that directory with full read-write
> > access for a user on a WinXP client elsewhere on my network, am I
> > creating a security exposure for myself?

>
> > I want to be able to update files on the website by treating it as a
> > mapped drive on the WinXP client, since I do most of my website
> > development on that client.

>
> > Is this okay, or a bad idea?

>
> > Thanks,
> > Randy

>
> It's a perfectly good idea, as long as you get the security right.
> First off, you have to make sure that no one from outside can get into
> the samba share - but I presume you've got that covered already from the
> firewall protecting your network. Secondly, it's perhaps a good idea to
> use samba to force the group and owner on the files so they are
> consistent with what your web server wants to see, rather than the user
> name and group that the windows client uses.


Thanks...yes I have the Samba part correct, and the ids/passwords are
right. Being a Linux/Unix newbie, I was more worried that setting a
'share' permission on the website folder would somehow open up a new
set of permissions to someone coming in via HTTP, such that they may
be able to delete a file (for example).

Thanks,
Randy

 
Reply With Quote
 
David Brown
Guest
Posts: n/a

 
      10-13-2007, 07:44 PM
Randy Brick MacKenna wrote:
> On Oct 13, 6:51 am, David Brown
> <david.br...@hesbynett.removethisbit.no> wrote:
>> Randy Brick MacKenna wrote:
>>> I've set up a Linux (openSUSE) machine in my home as a file server,
>>> and Apache, visible on the internet with port forwarding through my
>>> router. I also have a Samba server running on this machine.
>>> Let's say I have a directory /srv/www/mysite that acts as the root
>>> folder for my websitewww.mysite.net
>>> If I also set up a Samba share for that directory with full read-write
>>> access for a user on a WinXP client elsewhere on my network, am I
>>> creating a security exposure for myself?
>>> I want to be able to update files on the website by treating it as a
>>> mapped drive on the WinXP client, since I do most of my website
>>> development on that client.
>>> Is this okay, or a bad idea?
>>> Thanks,
>>> Randy

>> It's a perfectly good idea, as long as you get the security right.
>> First off, you have to make sure that no one from outside can get into
>> the samba share - but I presume you've got that covered already from the
>> firewall protecting your network. Secondly, it's perhaps a good idea to
>> use samba to force the group and owner on the files so they are
>> consistent with what your web server wants to see, rather than the user
>> name and group that the windows client uses.

>
> Thanks...yes I have the Samba part correct, and the ids/passwords are
> right. Being a Linux/Unix newbie, I was more worried that setting a
> 'share' permission on the website folder would somehow open up a new
> set of permissions to someone coming in via HTTP, such that they may
> be able to delete a file (for example).
>


No, there is no such problem - Samba shares don't affect the shared
directories at all (except in that people with access to the shares have
access to the website files, obviously). But it's good to think about
these things.

mvh.,

David
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Home Directory Mapping to Share\UserName sometimes maps to Share Bill Windows Networking 3 10-16-2007 03:26 PM
How do I allow create directory but not move or delete in Samba/Linux? Craig Linux Networking 4 11-25-2004 10:42 PM
Insufficient Permissions to Spool directory with Samba printer Ringo Langly Linux Networking 5 11-12-2004 06:37 PM
Joining Samba 3.02rc1 to Active Directory Phoenix Linux Networking 0 01-30-2004 08:02 AM
Sharing directory with Samba Fabricio Greco Linux Networking 5 09-29-2003 02:07 PM



1 2 3 4 5 6 7 8 9 10 11