2

I'm running a Debian Squeeze system and trying to mount a windows share in /etc/fstab. I've got an existing cifs mount working, but it's a simple //xx.xx.xx.xx/sharename situation. This second one isn't working however.

The issue - the second share has white spaces in the path... multiple ones!

The line in fstab is:

//servername.org.au/ABC/Company Services/Department Services/Area Services/Restricted    /mnt/n-drive    cifs    id=0,credentials=/etc/samba/login.crt,iocharset=utf8,noperm        0       0

So far I've tried:

Double quotes around the path names in fstab

//servername.org.au/ABC/"Company Services/Department Services/Area Services/Restricted"    /mnt/n-drive    cifs    id=0,credentials=/etc/samba/login.crt,iocharset=utf8,noperm        0       0

Replacing the space with \040 (like in Linux)

//servername.org.au/ABC/Company\040Services/Department\040Services/Area\040Services/Restricted     /mnt/n-drive    cifs    id=0,credentials=/etc/samba/login.crt,iocharset=utf8,noperm        0       0

Escape with backslash

//servername.org.au/ABC/Company\ Services/Department\ Services/Area\ Services/Restricted    /mnt/n-drive    cifs    id=0,credentials=/etc/samba/login.crt,iocharset=utf8,noperm        0       0

None of these worked.

I've verified the directory is valid, I've tried replacing the servername.org.au with the IP it resolves to and that didn't help either.

The error I'm getting in kern.log is:

kernel: [1830446.002198] CIFS VFS: cifs_mount failed w/return code = -22

That's it - not a lot of detail to go on...

I'm using the EXACT same syntax and credentials for both mounts. I KNOW the credentials are valid and working because I use them to connect to the same share on my Windows box. I'd change the share name, but unfortunately it's not one of MY servers and they won't do it.

So I'm just gonna strap these two danishes to the side of my head and say:

Help Me Obi-Stack-Exchange! You're my only hope!

Thanks in advance!

(Edit: removed errant quotation marks in one of the examples)

1

Replacing the spaces with \040 is actually the right way to do it.

The reason why it’s not working for you is probably because there are (forgotten?) quotes after /Restricted:

//servername.org.au/ABC/Company\040Services/…/Restricted"    /mnt/n-drive    cifs    id=0,credentials=/etc/samba/login.crt,iocharset=utf8,noperm        0       0

Change that to:

//servername.org.au/ABC/Company\040Services/…/Restricted    /mnt/n-drive    cifs    id=0,credentials=/etc/samba/login.crt,iocharset=utf8,noperm        0       0

(Note that I’ve shortened the path a bit for better readability.)


Background: 040 is the ASCII code for space in octal numeral system.

| improve this answer | |
  • Sorry... the forgotten quotes after Restricted is my bad editing when posting the question. I copy-pasta'd the first example and edited to show the NEW example. Obviously I missed removing the closing quotation marks... – Rus Ti Jan 24 at 8:47
  • If you just mount //servername.org.au/ABC, will this work? – aaronk6 Jan 24 at 8:48
  • To clarify: Will it work if you mount a path on the same server that does not have spaces? – aaronk6 Jan 24 at 9:03
  • Just tried that and no... same error... – Rus Ti Jan 24 at 9:18
  • mount error(22): Invalid argument Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) – Rus Ti Jan 24 at 9:19

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.