I've been successfully able to mount a share on my Ubuntu Server using this command:

sudo mount -t cifs //IPTOSHARE/DriveLetter$/Folder/"Folder Space" /mnt/Folder/"Folder Space" -o username="",domain=""

However this only mounts the share until reboot.

I have tried to mount in fstab:

//IPTOSHARE/DriveLetter$/Folder/"Folder Space" /mnt/Folder/"Folder Space" cifs credentials=/home/username/.smbcredentials,uid=username,gid=sharegroup 0 0

However unlike the successful temporary mount, fstab does not like the following characters that WORKED on the temporary mount: $ ""

DriveLetter$ -Hidden share "Folder Space" - Folder that has a space in it. I know this is NOT idea but its what I have to work with.

Why can I successfully create a temporary share, but not a permanent share using fstab?

  • 1
    just place your command over at /etc/rc.local or whatever your distro runs user init scripts and you're done! – Marcel Apr 9 '13 at 16:45

What @Marcel suggests would work, but isn't best practice.

To use spaces in your fstab file, you need to use the octal ascii notation for a space:


So for your uses, it would look like:

//IP/Drive/Folder/Folder\040Name /mnt/Folder/Folder\040Name cifs creds... 0 0

Try adding that, then running:

sudo mount -a

And post back specific errors mentioned if they exist.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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