Linux mount error no such file or directory

can not use mount.cifs: mount error(2): No such file or directory

This problem has been identified by many users, e.g. one example . ALSO NOTE that the same command executed in my Ubuntu/debian system is able to mount successfully. Other information in the problematic machine:

ae429-1105 etc # mount.cifs --version mount.cifs version: 6.1 

/home/directory/path is certain to exist in the Gentoo environment? Strange that you don’t mention that as this is the obvious first question which arises.

You should add this information to the question so that other readers need not read the comments to get it.

14 Answers 14

You might need to provide the vers= option to the mount command to force version 3.0 if you’re trying to mount a share from a newer version of Windows. One of our fileservers was recently upgraded to 2012R2 and that’s when my mount stopped working. Setting it to vers=3.0 fixed the issue. Like most Samba/CIFS errors the «No such file or directory» message isn’t much help.

# mount -t cifs //win2012r2/someshare -o cred=/home/foo/.cifs_user,vers=3.0 /mnt/tmp 

..where I have my domain, username and password contained in the .cifs_user file:

user=MyUser password=MyPassword domain=MyDomain 

Apparently, smbmount uses a newer version of the SMB protocol by default since it worked without issue or any special options.

Notice below that the default protocol version is 1.0.

From the mount.cifs man page:

vers=arg SMB protocol version. Allowed values are: · 1.0 - The classic CIFS/SMBv1 protocol. · 2.0 - The SMBv2.002 protocol. This was initially introduced in Windows Vista Service Pack 1, and Windows Server 2008. Note that the initial release version of Windows Vista spoke a slightly different dialect (2.000) that is not supported. · 2.1 - The SMBv2.1 protocol that was introduced in Microsoft Windows 7 and Windows Server 2008R2. · 3.0 - The SMBv3.0 protocol that was introduced in Microsoft Windows 8 and Windows Server 2012. · 3.02 or 3.0.2 - The SMBv3.0.2 protocol that was introduced in Microsoft Windows 8.1 and Windows Server 2012R2. · 3.1.1 or 3.11 - The SMBv3.1.1 protocol that was introduced in Microsoft Windows 10 and Windows Server 2016. · 3 - The SMBv3.0 protocol version and above. · default - Tries to negotiate the highest SMB2+ version supported by both the client and server. If no dialect is specified on mount vers=default is used. To check Dialect refer to /proc/fs/cifs/DebugData Note too that while this option governs the protocol version used, not all features of each version are available. The default since v4.13.5 is for the client and server to negotiate the highest possible version greater than or equal to 2.1. In kernels prior to v4.13, the default was 1.0. For kernels between v4.13 and v4.13.5 the default is 3.0. 

Источник

Читайте также:  Astra linux special edition основные компоненты

Ошибка «/sbin/mount.vboxsf: mounting failed with the error: No such file or directory» (РЕШЕНО)

Общая папка VirtualBox позволяет с лёгкостью обмениваться файлами между виртуальной машиной и реальным компьютером.

Подробности о настройке общих папок вы найдёте в этом разделе.

Для общей папке установите Гостевые дополнения VirtualBox. Без гостевых дополнений общие папки не будут нормальной работать.

Общая папка может быть смонтирована автоматически — если указана соответствующая настройка в графическом интерфейсе VirtualBox. Общая папка также может быть автоматически смонтирована с помощью файла /etc/fstab добавлением записи:

ИМЯ_ШАРЫ /ПУТЬ/ДО/ТОЧКИ/МОНТИРОВАНИЯ vboxsf defaults 0 0

Также общую папку можно смонтировать вручную с помощью mount командой вида:

sudo mount -t vboxsf ИМЯ_ШАРЫ /ПУТЬ/ДО/ТОЧКИ/МОНТИРОВАНИЯ

Во время монтирования может возникнуть ошибка:

/sbin/mount.vboxsf: mounting failed with the error: No such file or directory

Для начала убедитесь, что точка монтирования указана правильно, и что вы используете правильное имя Общей папки (нужно использовать имя, а не путь до неё).

Если всё правильно, а ошибка осталась, то убедитесь, что используемое в команде имя sf_folder не существует как реальная папка:

sudo mount -t vboxsf sf_folder /home/user/folder

Предыдущая команда закончится указанной ошибкой, если существует настоящая папка sf_folder. Дело в том, что если имя общей папки совпадает с именем реального каталога в текущей папке, то программа mount.vboxsf (помогатель mount, который в действительности и выполняет монтирование) по какой-то причине пытается смонтировать реальную папку что в конечном счёте приводит к ошибке «mounting failed with the error: No such file or directory».

Также некоторые пользователи утверждают, что имена sf_folder и folder ОБЯЗАНЫ быть разными именами. Но, на самом деле, скорее всего это связано с описанным механизмом возникновения проблемы.

Посмотрите на вывод следующих команд — делается попытка смонтировать общей папки с именем Share. И хотя монтирование выполняется в папку share (другое имя), возникает ошибка из-за того, что в текущей рабочей директории содержится директория с именем Share. После удаления директории Share, общая папка с именем Share успешно монтируется в share.

Связанные статьи:

Источник

Cannot mount nfs4 share: no such file or directory

I am trying to get a basic nfs4 working between two machines (let’s call them server and client). I have followed this manual by letter to no avail. Here’s what I’m getting:

root@server#: tail -n 2 /etc/exports /export client-ip/24(rw,nohide,insecure,no_subtree_check,async,no_root_squash) /export/users client-ip/24(rw,nohide,insecure,no_subtree_check,async,no_root_squash) root@server#: showmount --exports Export list for server-ip: /export/users client-ip/24 /export client-ip/24 

Server side seems to be OK. Directories exist, their permissions are granted (775). Addresses (client-ip and server-ip) are numeric — replaced with acronyms here for obvious reasons. Next, the client:

root@client#: mount -v -t nfs4 server-ip:/export /opt/nfstest mount.nfs4: timeout set for Thu Apr 14 15:52:31 2011 mount.nfs4: text-based options: 'clientaddr=client-ip,addr=server-ip' mount.nsf4: mount(2): No such file or directory mount.nfs4: mounting server-ip:/export failed, reason given by server: No such file or directory 

It just doesn’t accept the remote folder. Apart from one above, I tried server-ip:/export/users , server-ip:/ — getting same result. Client does have access to server:

root@client#: telnet server-ip 2049 Trying server-ip. Connected to server-ip. Escape character is '^]'. root@client#: showmount -e server-ip Export list for server-ip: /export/users client-ip/24 /export client-ip/24 

Local directory /opt/nfstest exists. Module nfs is loaded on the nfs client. There are no firewall between the server and client. What else should I check? Additional information: Ubuntu Lucid (10.04.2), running on Amazon ec2 box. NFS versions ( nfs-common , nfs-kernel-server ) are 1:1.2.0-4ubuntu4.1.

Читайте также:  Linux установить run файл

Источник

mount.cifs fails with mount error(2): No such file or directory

I can also open the share in e.g. dolphin with smb:// protocol This used to work for years now with previous ubuntu versions. client system:

~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 19.04 Release: 19.04 Codename: disco ~# uname -a Linux mypc 5.0.0-21-generic #22-Ubuntu SMP Tue Jul 2 13:27:33 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux 
install cifs-utils:amd64 2:6.8-2 install keyutils:amd64 1.6-6 install samba-common:all 2:4.10.0+dfsg-0ubuntu2.2 install smbclient:amd64 2:4.10.0+dfsg-0ubuntu2.2 
~# smbd --version Version 3.6.25 

4 Answers 4

This is just a guess because I don’t remember what the default settings were on Samba 3.6 but I think CIFS is trying to mount with an smb dialect that that version of samba didn’t have yet.

Add the parameter vers=1.0 or maybe vers=2.0 to your list and see if you can connect:

mount -t cifs -o user=myuser,vers=1.0 //myserver/myshare /home/user/myserver/myshare/ 

EDIT: You may have to drop down the security level as well with another parameter: sec=ntlm

Perfect! The «vers=1.0» did it! Fun fact: I recently had to specify version 3.0 to mount a windows server 2019 share from linux. anyway, that error message is a real cheek!

i already tried with using vers and sec=ntlm and tons of other combinations to no avail, nothing works for me. no idea what kind of share is implemented, i try to get epson printer share working. using smbclient \\ip\share works with empty credentials, i can browse the share with no issues that way

I’m in the same situation: vers=1.0 and sec=ntlm don’t help at all. While with smbclient I’m able to list the shared directories. Any solutions?

Try to install the package keyutils, it solved for me:

sudo apt-get install keyutils 

I had to install the cifs-utils package:

sudo apt-get install cifs-utils 

Similar to the suggestions in this answer, you may need to define the SMB protocol version.

In my case, I could use vers=default even though the manpages indicate that this is what is supposed to be used when nothing is defined.

sudo mount -t cifs -o username=yourusername,vers=default //servername/sharepath/ /mnt/mountpoint/ 

Here is the complete list of version numbers accepted by the vers= argument according to man mount.cifs :

SMB protocol version. Allowed values are: • 1.0 - The classic CIFS/SMBv1 protocol. • 2.0 - The SMBv2.002 protocol. This was initially introduced in Windows Vista Ser‐ vice Pack 1, and Windows Server 2008. Note that the initial release version of Windows Vista spoke a slightly different dialect (2.000) that is not supported. • 2.1 - The SMBv2.1 protocol that was introduced in Microsoft Windows 7 and Windows Server 2008R2. • 3.0 - The SMBv3.0 protocol that was introduced in Microsoft Windows 8 and Windows Server 2012. • 3.02 or 3.0.2 - The SMBv3.0.2 protocol that was introduced in Microsoft Windows 8.1 and Windows Server 2012R2. • 3.1.1 or 3.11 - The SMBv3.1.1 protocol that was introduced in Microsoft Windows 10 and Windows Server 2016. • 3 - The SMBv3.0 protocol version and above. • default - Tries to negotiate the highest SMB2+ version supported by both the client and server. If no dialect is specified on mount vers=default is used. To check Dialect refer to /proc/fs/cifs/DebugData Note too that while this option governs the protocol version used, not all features of each version are available. The default since v4.13.5 is for the client and server to negotiate the highest possible version greater than or equal to 2.1. In kernels prior to v4.13, the de‐ fault was 1.0. For kernels between v4.13 and v4.13.5 the default is 3.0. 111 

Источник

Читайте также:  Linux команды удаленный сервер

«mount error(2): No such file or directory» error on attempting to mount NAS from Arch

Sometimes on my computer I cannot even see directories with my shell (bash) because I’m not in a root shell. It may differ for you, and this possibly cannot work but try changing the parameter user to user=root rather than .

No that didn’t work. There is no root user on the NAS so I wouldn’t expect it to. I tried admin too, and that didn’t work either. Thanks for suggestion.

3 Answers 3

The syntax might be confusing — after the server name, you don’t specify the path, but the share name, as defined in the smb.conf file at the server side. So, instead:

sudo mount -t cifs -o user= //192.168.0.14/volume1/NetBackup/Share /mnt/NAS 
sudo mount -t cifs -o user= //192.168.0.14/ /mnt/NAS 

I had the same issue it turned out that I forgot to create the share directory so I created the share in the path and voila the error got fixed just I thought to add it as one of the possible cause of the error in case someone may benefit from it

ERROR [root@samba-client ~]# mount -t cifs -o user=smbuser //192.168.20.115/smbshare /client/ Password for smbuser@//192.168.20.115/smbshare: ******** mount error(2): No such file or directory Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) [root@samba-client ~]# mount -t cifs //192.168.20.115/smbshare /client/ -o user=smbuser

Troubleshooting mount -t cifs //192.168.20.115/smbshare /client/ -o user=smbuser

check your samba server configuration file: vi /etc/samba/smb.conf make sure the samba directory name in the square bracket is the same with the one you trying to access from the client end also ensure the path is correct. ie

 comment = Samba share path = /smbshare writable = yes guest ok = yes guest only = yes public = yes 

Источник

Оцените статью
Adblock
detector