0

I've created a remote mounted drive by adding this to my /etc/fstab:

\\192.x.x.x\web /mnt/web cifs username=X,password=X,domain=X

and mounting it with sudo mount /mnt/web (which works perfectly!)

The problem is that I can only mount the drive as root. Running mount /mnt/web (without sudo) results in the error

mount: only root can mount \192.x.x.x\web on /mnt/web

I read this guide that suggests the following syntax

//192.168.1.100/data /media/corpnet cifs username=johnny,domain=sealab,noauto,rw,users 0 0

When I change my entry to use this syntax like this:

\\192.x.x.x\web /mnt/web cifs username=X,password=X,domain=X,noauto,rw,users 0 0

and run mount /mnt/web I get

mount.cifs: permission denied: no match for /mnt/web found in /etc/fstab

I then read this question along with it's highest voted answer, but the same error appears.

I have checked that my web folder in the /mnt directory has CHMOD 775, which should be ok.

What could be wrong?

2

UPDATE (see the discussion on the comments):

You are typing \\ instead of //. For linux you must use // even if the network file system is running inside Windows.

The old post:

You are writing mount /mnt/web, but the directory you write in /etc/fstab was /media/corpnet so you need to write /mnt/web in /etc/fstab...

So change /media/corpnet

//192.168.1.100/data /media/corpnet cifs username=johnny,domain=sealab,noauto,rw,users 0 0

To /mnt/web:

//192.168.1.100/data /mnt/web cifs username=johnny,domain=sealab,noauto,rw,users 0 0

Or if you can't edit fstab change your command to mount /media/corpnet (and you must create this directory too)

Good lucky and if that works, please select this as the correct answer.

  • I am not using corpnet any place in my code. I was just quoting the syntax specified by the linked article. I'll edit my question to make this more obvious – Daniel Sep 1 '18 at 6:45
  • Now you are typing \\ instead of // for linux you must use // even if the network file system is running inside Windows. – Luciano Andress Martini Sep 3 '18 at 12:09
  • If you are not typing \\ and this is not the real file contents consider posting the real file. – Luciano Andress Martini Sep 3 '18 at 12:17
  • That was it! Changing \\ to // fixed my problem! – Daniel Sep 3 '18 at 20:46
  • I updated the answer with this information, please select it as the right answer. – Luciano Andress Martini Sep 3 '18 at 20:46

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.