Tuesday, December 16, 2008

Sharing USB files on Ubuntu

USB flash disk is no doubt industry standard for portable storage. Everybody carrying one or more, even that's a "pure" USB flash disk or any portable device with storage, since most these modern gadget has USB Mass Storage profile.

To share these files on Ubuntu for other users, you may use Samba file sharing. Samba is file sharing server act just like Windows share, for sharing files and printer. To install samba on ubuntu as simple as installing other program.

> sudo apt-get install samba

Once installed, start sharing folder by right-click on a folder name opened using Nautilus (the de-facto file manager) -> Sharing. Make sure the file you going to share has appropriate permission. To be able to read, at least has read privileges on "other". Chmod them to 644.

To be able to share USB files, you need to change default privileges of USB flash disk files. As it auto-mounted when you insert it, USB flash disk get file permission setting from gnome setting editor. Change them with :

> gconf-editor


Go to system>storage>default_options>vfat, double click "mount_options" on the right, click "add", enter the text "fmask=000", click ok. Also double click on umask need to change to "000" (that's triple zero). Remember that's masking code not the mode itself. So umask = 000 equal to 777 filemode. Save it then remount the volume.

No comments: