Page 1 of 6

How do I share folders? - Solved

Posted: 8. Feb 2013, 09:54
by paul
I have set up my notebook with Salix on a wifi Windows network, but although I can see and browse the shared folders on the network of other machines with gnome commander as well as copy files from other machines, I cannot see the Salix machine from the other machines; it simply does not show up on the network. So how can I even out this one way street and particularly how does one share a folder (Say "/home/paul/Download") on the network? There is probably an easy way but I am darned if I can find it. :?:

Re: How do I share folders?

Posted: 8. Feb 2013, 12:12
by aurlaent
You can use samba.
Have a look at /etc/samba/smb.conf-sample
More info here.

Re: How do I share folders?

Posted: 8. Feb 2013, 22:25
by sqlpython
EDIT: You may want to read through the 5 page thread but the solution is now in User Documentation Wiki at the below link (SAMBA File Sharing)
http://www.salixos.org/wiki/index.php/C ... umentation

There is probably an easy way
Nope! :lol:
But..........

This always works for me.
But I don't guarantee a thing..
Just always works for me.

I hacked together a Basic smb.conf which I am using on Salix 14.
I modified the Share section for your /home/paul/Download dir.

You can save it to /etc/samba as root user.

Should get your desired results but first you must set some security and and groups memberships
And make a samba share group.
Remember When you can see your Own Shared Folder contents in your FileManager via the Network choice you are shared.
Then others can see it also.


The smb.conf is at the bottom of post save it to /etc/samba appropriately.

Here are the instructions I normally use to make
your sambashare group.
Make Your User a member of it.
Create your samba password for your user

You can cut and paste commands to a terminal to which you have
su
and become root
Leave out all # ..As that is to indicate the Terminal prompt.

Install thunar-shares-plugin package if you are using Thunar File Manager.

Configuration Steps

This marks the named objects for automatic export to the environment of subsequently executed commands:

Code: Select all

# export USERSHARES_DIR="/var/lib/samba/usershares"
# export USERSHARES_GROUP="sambashare"
This creates the usershares directory in var/lib/samba:

Code: Select all

# mkdir -p ${USERSHARES_DIR}

This makes the group sambashare:

Code: Select all

# groupadd ${USERSHARES_GROUP}
This changes the owner of the directory and group you just created to root:

Code: Select all

# chown root:${USERSHARES_GROUP} ${USERSHARES_DIR}
This changes the permissions of the usershares directory so that users in the group sambashare can read, write and execute files:

Code: Select all

# chmod 01770 ${USERSHARES_DIR}

Make your user a member of the Group, replacing "your_username" with the name of your user:

Code: Select all

# usermod -a -G ${USERSHARES_GROUP} your_username
Check you are in the Group just created

Code: Select all

# id paul
Create a Password for Paul

Code: Select all

# smbpasswd -a paul
Enable Paul

Code: Select all

#  smbpasswd -e paul



Using your favorite text editor as root, create the file /etc/samba/smb.conf and
Copy and Paste in the smb.conf below and save.

Then Restart Samba

Code: Select all

# /etc/rc.d/rc.samba restart
or Reboot..

[global]
Workgroup = Workgroup
server string = %h server (Salix)
panic action = /usr/share/samba/panic-action %d
log file = /var/log/samba/log.%m
usershare allow guests = Yes
####### Authentication #######
security = user
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0

max log size = 1000
name resolve order = bcast lmhosts host wins
printcap name = cups
dns proxy = No

usershare max shares = 100
map to guest = Bad User

idmap config * : backend = tdb

########## Printing ##########

# cupsys-client package.
printing = cups
printcap name = cups

########## Share Definitions ##########
[homes]
comment = Home Directories
valid users = paul
create mask = 0700
directory mask = 0700

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
print ok = Yes
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers

[PUBLIC]
path = /home/paul/Download
valid users = paul
read only = No
create mask = 0775

Re: How do I share folders?

Posted: 10. Feb 2013, 05:12
by paul
Hello sqlpython,
thanks for that, have done this to the letter with two minor changes by replacing "Workgroup" with "MSHOME" which is the name of my workgroup (it goes back to the Windows 98 days), and replaced "your_username" in the command line "usermod -a -G ${USERSHARES_GROUP} your_username" with "paul".
I have no luck however.
I have tried making some alterations in the smb.conf of a Ubuntu machine I have running that accesses the network perfectly, and which can be seen and copied to from all the other three Windows machines on the network without problems (there are 5 machines on the network, as I run a home business).
So if you have any further suggestions to fix this, that would be great.
If not maybe someone else? Is there a "share folders" utility for Salix as there is for Ubuntu?
Thanks in advance. Paul.

Re: How do I share folders?

Posted: 10. Feb 2013, 08:38
by knome
EDIT: Please ignore this post. Incorrect information - knome

I don't know if this will help but Thunar has a Share Custom Action which has been default set to only apply to the ~/Public Folder. You can edit the Custom Action as follows...

Thunar > Edit > Configure custom Actions > Share > Edit button > Appearance Conditions tab - change File Pattern from Public to *

This will enable Thunar right-click Share on any Folder though I'm not sure whether the underlying samba/network sharing configuration will let it work.

Re: How do I share folders?

Posted: 10. Feb 2013, 09:11
by paul
Hello knome, I am using Gnome Commander, not Thunar file manager, or is that not relevant here? I am sorryI am rather green at this. Paul. :?:

Re: How do I share folders?

Posted: 10. Feb 2013, 09:22
by knome
EDIT: Please ignore this post. Incorrect information - knome

It's just that you asked if there was a ""share folders" utility in Salix" and the Thunar custom action kind of fits the bill. :D

Re: How do I share folders?

Posted: 10. Feb 2013, 12:53
by mimosa
If you don't have Thunar installed you can easily do so (and it shouldn't take up too much room).

Re: How do I share folders?

Posted: 10. Feb 2013, 16:27
by laprjns
knome wrote:I don't know if this will help but Thunar has a Share Custom Action which has been default set to only apply to the ~/Public Folder. You can edit the Custom Action as follows...

Thunar > Edit > Configure custom Actions > Share > Edit button > Appearance Conditions tab - change File Pattern from Public to *

This will enable Thunar right-click Share on any Folder though I'm not sure whether the underlying samba/network sharing configuration will let it work.
Is this part of the default installation? I can't find any Custom Action called Share on my two Salix 14 installations

Re: How do I share folders?

Posted: 10. Feb 2013, 18:02
by knome
laprjns wrote:
knome wrote:I don't know if this will help but Thunar has a Share Custom Action which has been default set to only apply to the ~/Public Folder. You can edit the Custom Action as follows...

Thunar > Edit > Configure custom Actions > Share > Edit button > Appearance Conditions tab - change File Pattern from Public to *

This will enable Thunar right-click Share on any Folder though I'm not sure whether the underlying samba/network sharing configuration will let it work.
Is this part of the default installation? I can't find any Custom Action called Share on my two Salix 14 installations
:oops: Gaah! Oh dear. No, it isn't part of the default installation. I imported it from elsewhere. I most humbly apologise for being a dick - knome. :oops: