Error 255 when sharing folder on Ubuntu 12.04

Solution 1:

The simplest solution would to be to add the stated lines,

usershare owner only = false

to the Global section of the smb.conf file by,

sudo -H gedit /etc/samba/smb.conf

then save the file and restart the samba service,

sudo service smbd restart

Then try again to share the selected folder

Solution 2:

Open the parent directory with administrator permission and try again

sudo apt-get install gksu

gksu nautilus /your_complete_path/

then share the folder...