OCFA Installation - Creating a Temporary Share

1 minute read

This single will cover creating a temporary file share on your Samba server to easily share packages. This tutorial is geared towards OCFA on Debian users, but is a general Samba share configuration.

The only assumption is that you have a working Samba installation.

Log in as root
Create the directory you want to share - mine will be called 'ocfaShare' and will be directly under /
cd /
mkdir ocfaShare
chmod 777 ocfaShare
Note 777 is dangerous if you are not on a trusted network. Make sure you apply permissions appropriate to your situation. Click here for a tutorial on setting Linux file permissions.

Now open an editor and edit /etc/samba/smb.conf
vi /etc/samba/smb.confAdd the following to smb.conf:
[ocfaShare]
path = /ocfaShare/
valid users = (the name of a local user account)
public = no
writeable = yes
create mask = 775

Save smb.conf, and exit.
Create 'smbusers' in /etc/samba/
vi /etc/samba/smbusers
For each user you want to create add the line
= “”Where username is the name of the user you specified in the 'valid users' section. Then save, and exit.
Now set a samba password for the user:
smbpasswd -a usernameNow restart Samba
/etc/init.d/samba restartType 'ifconfig' to get the IP address of the local computer (usually eth0).
Using this IP address you should be able to access the share.

On a Windows computer, go to 'start' and 'run' then type '\\x.x.x.x/ocfaShare/' where x is your ip address.
On MacOSX go to 'Go' and 'Connect to Server'. For the server address type in 'smb://x.x.x.x/ocfaShare'
In both cases you will be asked to log in. Use the username and password you specified earlier.

Just remove the line in smb.conf starting with [ocfaShare] to remove the shared folder when done.

Tags:

Updated:

Leave a Comment