Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: lightnb on May 29, 2007, 03:26:49 AM

Title: Creating Non-ibay shares
Post by: lightnb on May 29, 2007, 03:26:49 AM
Hi all,

I would like to share a folder without using the ibay function. How can this be done?

Basically, I need to share a folder within a specific directory structure. Eg.

Code: [Select]
/home/myfolder contains a bunch of files that I put there, and the share named 'myshare' points to
Code: [Select]
/home/myfolder/public

By default, ibays create there own little folder structure inside of
Code: [Select]
/home/e-bob/files/ibays, which doesn't work since I need specific files to be one level above the share for a script to run properly.

SMB.conf has a warning about not editing it... what are my other options?
[/code]
Title: Re: Creating Non-ibay shares
Post by: Stefano on May 29, 2007, 03:39:24 PM
Quote from: "lightnb"
Hi all,

I would like to share a folder without using the ibay function. How can this be done?

Basically, I need to share a folder within a specific directory structure. Eg.

Code: [Select]
/home/myfolder contains a bunch of files that I put there, and the share named 'myshare' points to
Code: [Select]
/home/myfolder/public

By default, ibays create there own little folder structure inside of
Code: [Select]
/home/e-bob/files/ibays, which doesn't work since I need specific files to be one level above the share for a script to run properly.

SMB.conf has a warning about not editing it... what are my other options?
[/code]


you can do it via a custom template

Code: [Select]

mkdir -p /etc/e-smith/templates-custom/etc/smb.conf
cd /etc/e-smith/templates-custom/etc/smb.conf
pico 70myshare


now, into this new file, write down something like this
Code: [Select]

{
# This is my share
$OUT .= <<HERE;
[Myshare]
path = /home/mypath
writeable = yes
browseable = no
create mask = 0600
directory mask = 0700
HERE
}


then you have to expand smb.conf and restart smb service

HTH

Ciao

Stefano
Title: Creating Non-ibay shares
Post by: lightnb on May 30, 2007, 11:41:12 AM
Thanks Stefano,

I got most of the way there, but seem to be stuck on the last step.

I tried from the "/etc/e-smith/templates-custom/etc" directory:
Code: [Select]
expand-template smb.conf

and got:

Code: [Select]
ERROR: no templates were found for smb.conf . at /sbin/e-smith/expand-template line 45

I've also tried:

Code: [Select]
expand-template /etc/e-smith/templates-custom/etc/smb.conf/70myshare

with the same result, and:

Code: [Select]
expand-template /etc/e-smith/templates-custom/etc/smb.conf

which complains that the path is a directory.
Title: Creating Non-ibay shares
Post by: Stefano on May 30, 2007, 12:23:57 PM
Quote from: "lightnb"
Thanks Stefano,

I got most of the way there, but seem to be stuck on the last step.

I tried from the "/etc/e-smith/templates-custom/etc" directory:
Code: [Select]
expand-template smb.conf


Hi..

try
Code: [Select]

expand-template /etc/samba/smb.conf
service smbd restart


HTH

Stefano
Title: Creating Non-ibay shares
Post by: lightnb on May 30, 2007, 01:43:31 PM
Thank you. That worked. :)

One more question- How do I assign users/permissions to the share?

Do I need to make a separate template file for users?

Thanks again,

Nick