Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a VB6 application running on Wine. That application uses a mdb database, but the mdb file is on a Windows share (Iomega StorCenter). I mount the share via fstab, and assign the letter "d:" via Wine. When I run the application fires a exception because it can't lock the mdb file (create a lock file).

The fstab line I use is:

//IomegaStorCenter/public/Server /home/jmm/Iomega cifs,uid=wine,gid=users,fmask=7777,dmask=0777,iocharset=utf8,codepage=unicode, unicode 0 0

Anybody knows how can I mount the share to avoid the exception?

share|improve this question

As with umask, fmask and dmask are subtracted from 777 to get you the effective permitions. So you are actually mounting your share as 000, meaning "no one can read, write or execute"

Also, do you really need that many custom configuration options? If this is your home computer, I suggest this:

//IomegaStorCenter/public/Server /home/jmm/Iomega cifs defaults,uid=jmm,gid=plugdev,umask=022

jmm, I presume, is your username. If not, change accordingly. Also, I strongly suggest you not to mount drives in your home directory. As root, create /mnt/iomega directory and then mount there. If you want, create a symlink in your home folder pointing there. The command in terminal would be:

sudo mkdir -p /mnt/iomega

And the fstab entry would then be:

//IomegaStorCenter/public/Server /mnt/iomega cifs defaults,rw


If this didn't work, let's try from the very beggining, just to check if there are any loose ends:

1 - Delete all lines from fstab concerning the IomegaStorCenter. Reboot

2 - Use Nautilus > Network > Windows Network > Workgroup (or whatever your workgroup is called), and see if the drive shows. Double-click it.

3 - Does it ask for username/password? Do you know them? Do they work and nautilis show the shared folders? (note: this is not your Ubuntu username/password.It's the share login/password, which you might have previously configuted in IomegaStorCenter

4 - Stil using nautilus, can you drag and drop and create files there? Edit them, rename, delete, etc?

If yes, then fstab is your only issue. If not, then you must configure IomegaStorCenter before going on, until you can properly access it via Nautilus.

5 - Unmount the drive in Nautilus (use the "Eject" button)

Now in terminal (it can be done via GUI/Nautilus, but copy-and-paste command in terminal is faster and less error-prone):

6 - delete the old mountpoint. MAKE SURE IT IS EMPTY BEFORE YOU DO THAT

rmdir /home/jmm/Iomega 

7 - create the new mountpoint and a symlink from old location to the new one

sudo mkdir -p /mnt/iomega
ln -s /mnt/iomega /home/jmm/Iomega

8 - Add one (but not both) of these lines to fstab, depending on whether your share needs password or not:

//IomegaStorCenter/public/Server /mnt/iomega cifs defaults,rw,username=YOURSHAREUSER,password=YOURPASSWORD 0 0
//IomegaStorCenter/public/Server /mnt/iomega cifs defaults,rw 0 0

9 - Mount it, to test if enty is ok:

sudo mount /mnt/iomega

10 - Open nautilus, got to /mnt/iomega and try to copy some files. Edit, delete, etc.

If it works, great. If not, try to copy files using terminal and paste here the error message. also type ls -la /mnt/iomega, sudo mount and paste results.

11 - Now go to Wine config and make sure D: points to the new, correct location, /mnt/iomega. Also use nautilus to browse to /home/jmm/.wine/dosdevices/d: and see if it the correct location.

12 - Test you VB app and be happy :)

share|improve this answer
Thank you! I tried but the exception continue to appear! – Jorge Mota Mar 16 '12 at 15:24
@JorgeMota: I would need more details on what steps you did and what exact errors showed up. Simply saying "it's still not working" isn't very meaningful. – MestreLion Apr 10 '12 at 19:52

Use this line in your fstab

//server/share /mnt/mountname cifs username=server_user,password=user_password,iocharset=utf8,mode=0777,dir_mode=07‌​77 0 0


server = your server that you are trying to access
share = mapped share on that server
/mnt/mountname = any folder that you created with sudo /mnt/<folder_name> (or any folder in your home that you can access
username = the name of the user on that server that can access the mount
password = the password for that user

After that you can test with sudo mount -a, if you don't get any faults you can safely reboot to find your shares mounted in /mnt/<folder_name>.

To use a credentials file instead of the username and password parameters on the fstab you can create a file with those 2 lines so that your username and password are not explicitly shown in the fstab

sudo nano /etc/cifspwd

Add these lines to the file

username=<username on server>
password=<password for that username>

Press ctrl+x keys and when asked press y to save the file.

Secure it with

sudo chmod 600 /etc/cifspwd

Use this line instead of the previous

//server/share /mnt/mountname cifs credentials=/etc/cifspwd,iocharset=utf8,mode=0777,dir_mode=07‌​77 0 0

After this it will be safe to reboot and you mount should be mounted and your details secured.

share|improve this answer
Thank you! I tried but the exception continue to appear! – Jorge Mota Mar 16 '12 at 15:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.