Samba

From BubbaWiki
Jump to navigation Jump to search

Samba provides access to the files on your B3 through the SMB/CIFS protocol. This is the network file protocol invented and used by Microsoft Windows, but can also be accessed from Linux and Mac computers.

The default configuration shares the following:

Share Path Access
storage /home/storage everyone in your network can read and write files here
home /home/<username> users created through the webinterface can access this personal home directory, only the user itself has access

Samba also joins the "Excito" workgroup by default.

If you want to change how Samba makes your files accessible, edit /etc/samba/smb.conf

Mounting shares from Linux

Samba support CIFS Unix extensions which means support for Unix file permissions and ownership info is available when mounting a CIFS share on a Linux System. This can be troublesome if your user IDs do not match with the ones on the B3. Your local system might not give you the needed permission - to work around you can mount the share using the noperm mount option.

 mount //b3/storage /mnt -ouser=myuser,noperm

More restrictive storage

If you want to give access on the storage share to registered users only, edit your /etc/samba/smb.conf and change the [storage] section like this:

[storage]
   comment = Common storage
   writable = yes
   guest ok = no
   force group = users
   force create mode= 0664
   force directory mode = 0775
   path = /home/storage
   hide dotfiles = yes
   hide files = /lost+found/
   hide special files = yes
   browseable = yes