I tried to mount a windows share into the Linux server by using the following command:

mount -t cifs -v -o username=myname,password=mypassword //somename.net/the/path/to/the/directory /my/local/path

Then it failed with error: mount error (2): No such file or directory

Also, I tried to mount other paths:

//somename.net/the/path/to/the - mount error(13) Permission Denied
//somename.net/the/path/to - mount error(13) Permission Denied
//somename.net/the/path - success

I highly suspect that first 2 paths are not allowed to access by me as the admin added some restriction on them.

Also, I can confirm that the path I want to access is existing as I can see it in Windows File Explorer.

Any ideas why? really appreciated

More Failed Attempts:

  1. -o username=name,password=pass,domain=mydomain,vers=1.0: Mount error: Server abruptly closed the connection.
  2. -o username=name,password=pass,domain=mydomain with vers=2.0 or 2.1 or 3.0: failed with mount error (2) No such file or directory

Solved by adding “List Folder” permission to //somename.net/the/path/to/the and //somename.net/the/path/to.

So does it mean the folder cannot be mounted and considered as not existing if the user does not have any permission to its parent folders?

  • Nice! Typically a directory needs to have what is called in Linux, execute permissions. That means the directory needs to be executable to see what is in it. I am mainly a macOS and Linux person but it sounds like “List Folder” works in a similar way. – Giacomo1968 Sep 1 '20 at 2:45
  • 1
    hey @Giacomo1968 thanks for the clarification. it makes more sense now – laventy Sep 1 '20 at 2:49

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.