-
FreakHavoc
- Posts: 55
- Joined: Sun Dec 11, 2011 9:47 am
Need help mounting Windows share
Hey guys, I need help mounting a Windows share using the following guide (using Putty to log in to the Pi):
http://rasspberrypi.wordpress.com/2012/ … pberry-pi/
My computer IP is 192.168.1.10 and the share is called «share». No password is required. The directory I want to use on the Pi is called «network».
First the guide says that I should create the directory in the mnt directory, but doesn’t say what to type, so I just create the dir in the home/pi directory using
Then, when I type
Code: Select all
sudo mount -t cifs -o guest //192.168.1.10/share /home/pi/network
it gives me the following error:
Code: Select all
mount error(20): Not a directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
If I type
Code: Select all
sudo mount -t cifs -o guest //192.168.1.10/share ./home/pi/network
it says
Code: Select all
Couldn't chdir to ./home/pi/network: No such file or directory
What is wrong? If necessary, how can I create/access a directory in the mnt directory? The connection is fine since I use Putty.
Thanks!
-
DirkS
- Posts: 10809
- Joined: Tue Jun 19, 2012 9:46 pm
- Location: Essex, UK
Re: Need help mounting Windows share
Wed Dec 24, 2014 5:15 pm
Try putting the options (‘-o guest’) at the end of the command.
A few comments: I wouldn’t create the directory with ‘sudo’. It means you have limited access as user ‘pi’. Just use ‘mkdir network’.
The ‘.’ means ‘current directory’. So ‘./home/’ looks for the directory ‘home’ in the current directory. That was probably not what you were trying to do
Gr.
Dirk.
-
FreakHavoc
- Posts: 55
- Joined: Sun Dec 11, 2011 9:47 am
Re: Need help mounting Windows share
Wed Dec 24, 2014 6:08 pm
Hey and thanks for your reply. After recreating the «network» directory without sudo, I tried
Code: Select all
sudo mount -t cifs //192.168.1.10/share /home/pi/network -o guest
but I still get the same mount error code (20).
Then I tried
Code: Select all
sudo mount -t cifs //192.168.1.10/share /home/pi/network
It then prompts me for a password which I do not have. If I just type something I get the mount error (20) code.
Any other suggestions as to what I could try?
-
emgi
- Posts: 357
- Joined: Thu Nov 07, 2013 4:08 pm
- Location: NL
Re: Need help mounting Windows share
Wed Dec 24, 2014 7:27 pm
FreakHavoc wrote:Hey and thanks for your reply. After recreating the «network» directory without sudo, I tried
Code: Select all
sudo mount -t cifs //192.168.1.10/share /home/pi/network -o guest
but I still get the same mount error code (20).
Then I tried
Code: Select all
sudo mount -t cifs //192.168.1.10/share /home/pi/network
It then prompts me for a password which I do not have. If I just type something I get the mount error (20) code.
Any other suggestions as to what I could try?
As far as my experience with widoze goes, it is requesting the password for user root while you are trying to issue the mount command as such.
You’re getting denied access since that user doesn’t exist on windoze (at least, that’s my guess )
Several ways to get around this problem:
-create user pi or root with matching password and access rights on win7.
-specify a valid windoze account name & passwd while mounting the share.
/emgi
-
andrum99
- Posts: 1720
- Joined: Fri Jul 20, 2012 2:41 pm
Re: Need help mounting Windows share
Wed Dec 24, 2014 8:49 pm
FreakHavoc wrote:Hey and thanks for your reply. After recreating the «network» directory without sudo, I tried
Code: Select all
sudo mount -t cifs //192.168.1.10/share /home/pi/network -o guest
but I still get the same mount error code (20).
Then I tried
Code: Select all
sudo mount -t cifs //192.168.1.10/share /home/pi/network
It then prompts me for a password which I do not have. If I just type something I get the mount error (20) code.
Any other suggestions as to what I could try?
Try this:
Code: Select all
sudo mount -t cifs //192.168.1.10/share /home/pi/network -o username=Guest,password=Guest
-
andrum99
- Posts: 1720
- Joined: Fri Jul 20, 2012 2:41 pm
Re: Need help mounting Windows share
Wed Dec 24, 2014 10:59 pm
Samba, and therefore smbpasswd, have nothing to do with mounting remote SMB shares. Samba is an SMB server for Linux and is not connected to Linux’s in kernel SMB filesystem support.
-
FreakHavoc
- Posts: 55
- Joined: Sun Dec 11, 2011 9:47 am
Re: Need help mounting Windows share
Fri Dec 26, 2014 10:23 pm
Hey again guys, an update. I recently got a Seagate Central, and can connect to it without problems. Great!
I think the reason why I couldn’t get the Windows 7 share to work was that the shared directory was a subdirectory of one of the Windows 7 users. Lesson learned, at least. Thanks again for your tips!
Return to “Troubleshooting”
- Forum
- The Ubuntu Forum Community
- Ubuntu Official Flavours Support
- Networking & Wireless
- [all variants] [SOLVED] 8.04, CIFS, nounix and Unix extensions
-
[SOLVED] 8.04, CIFS, nounix and Unix extensions
After upgrading to 8.04 I’ve found — like a lot of people — that Samba connections to NAS devices have needed to be changed.
SMBFS seems no longer to be supported and switching to CIFS caused me the same error:
mount error 20 = Not a directory
as a lot of other people. A workable solution that a lot of people have adopted is to put ‘nounix’ as an option in the mount command and this does allow me to make a connection.
However, this (I believe) has the effect of suspending UNIX file information and, as a consequence, the dates are not preserved on file transfer to the NAS device. This is unfortunate, as I was using the device as an incremental file backup medium using a simple cp -u command and the broken file dates mean that this is no longer working.
Has anyone any suggestions as to what I could try next? I’ve looked at using the ftp server on the device, but it seems to have a similar problem with dates.
Cheers,
Martin
—
Martin
(full ‘o’ beans)
-
Re: 8.04, CIFS, nounix and Unix extensions
Bump — if anyone has any suggestions?
—
Martin
(full ‘o’ beans)
-
Re: 8.04, CIFS, nounix and Unix extensions
Originally Posted by martinveasey
SMBFS seems no longer to be supported and switching to CIFS caused me the same error:
Has anyone any suggestions as to what I could try next?
Suggestion: Can you not use scp or rsync? It seems to me to be the most logical choice.
-
Re: 8.04, CIFS, nounix and Unix extensions
Hi thanks for your reply.
I’d agree that ssh’d rsync or scp are a more workable general solution — I use these elsewhere already.
Unfortunately, the NAS box is rather limited. It provides access only via SMB and FTP services .
Cheers
—
Martin
(full ‘o’ beans)
-
Re: 8.04, CIFS, nounix and Unix extensions
try the sfu option like so:
Code:
//netbiosname/sharename /media/sharename cifs credentials=/root/.smbcredentials,iocharset=utf8,nounix,sfu,file_mode=0777,dir_mode=0777 0 0
from man mount.cifs:
sfu
When the CIFS Unix Extensions are not negotiated, attempt to create
device files and fifos in a format compatible with Services for Unix
(SFU). In addition retrieve bits 10-12 of the mode via the SET‐
FILEBITS extended attribute (as SFU does). In the future the bottom
9 bits of the mode mode also will be emulated using queries of the
security descriptor (ACL). [NB: requires version 1.39 or later of
the CIFS VFS. To recognize symlinks and be able to create symlinks
in an SFU interoperable form requires version 1.40 or later of the
CIFS VFS kernel module.
-
Re: 8.04, CIFS, nounix and Unix extensions
Thanks for that — I won’t be able to try it until the weekend as its at a remote site.
Do you know whether this will interfere with the NAS’ ability to serve to Windows XP machines?
Cheers,
Martin
—
Martin
(full ‘o’ beans)
-
Re: 8.04, CIFS, nounix and Unix extensions
Unless I misunderstand the man mount.cifs information, it should only affect the machine using sfu in the mount options — shouldn’t affect windows (or other) machines at all.
-
Re: 8.04, CIFS, nounix and Unix extensions
The «sfu» option didn’t really help. Mounting the NAS allows viewing of the correct file dates on existing files — e.g. written via a Windows share, but writing new files still gives the wrong date — sometime in 2006. «Touching» the file subsequently doesn’t help — unsurprisingly.
Never mind.
—
Martin
(full ‘o’ beans)
-
Re: 8.04, CIFS, nounix and Unix extensions
is it possible to check/change the date on your nas device?
-
Re: 8.04, CIFS, nounix and Unix extensions
It is indeed possible — embarassingly, the date was set in 2006.
Changing it / enabling NTS, now means that files transferred across or created under Ubuntu take a file time equal to that running on the NAS box.
Interestingly enough, copying files across under Windows preserves the file time on the file as is.
I’m not sure whether this will have a practical effect, but it’s good enough for me. Thanks for the suggestions.
Martin
—
Martin
(full ‘o’ beans)
Bookmarks
Bookmarks
Posting Permissions
Как правильно задавать вопросы
Правильно сформулированный вопрос и его грамотное оформление способствует высокой вероятности получения достаточно содержательного и по существу ответа. Общая рекомендация по составлению тем: 1. Для начала воспользуйтесь поиском форума. 2. Укажите версию ОС вместе с разрядностью. Пример: LM 19.3 x64, LM Sarah x32 3. DE. Если вопрос касается двух, то через запятую. (xfce, KDE, cinnamon, mate) 4. Какое железо. (достаточно вывод inxi -Fxz
в спойлере (как пользоваться спойлером смотрим здесь)) или же дать ссылку на hw-probe 5. Суть. Желательно с выводом консоли, логами. 6. Скрин. Просьба указывать 2, 3 и 4 независимо от того, имеет ли это отношение к вопросу или нет. Так же не забываем об общих правилах Как пример вот
-
Hellerick
- Сообщения: 5
- Зарегистрирован: 19 фев 2022, 08:41
- Контактная информация:
Не копируются файлы через GUI
19 фев 2022, 08:58
Приветствую.
Я подключил жесткий диск к домашнему Wi-Fi роутеру, рассчитывая использовать его со всех домашних устройств. Отформатировал его в NTFS (роутер отказался видеть ext4).
Включил, смонтировал. Содержимое диска вижу.
Но копировать туда файлы через графический интерфейс не могу (DoubleCommander ругается «Error: Cannot create file»).
Зато из командной строки — могу.
Еще могу через графический интерфейс создавать папки и перемещать уже существующие на диске файлы. И удалять могу.
Не можете подсказать, в каком направлении мне искать решение?
-
Chocobo
- Сообщения: 9954
- Зарегистрирован: 27 авг 2016, 22:57
- Решено: 214
- Откуда: НН
- Благодарил (а): 795 раз
- Поблагодарили: 2980 раз
- Контактная информация:
Не копируются файлы через GUI
#2
19 фев 2022, 09:54
Hellerick, как обычно, необходимо больше информации. Красное поле вверху страницы придумано не просто так.
Штатный файловый менеджер из базовой поставки тоже даёт
какую-то ошибку? Версия системы?
Как и куда монтировал, smb?
Что хоть за роутер такой?
-
Hellerick
- Сообщения: 5
- Зарегистрирован: 19 фев 2022, 08:41
- Контактная информация:
Не копируются файлы через GUI
#3
19 фев 2022, 10:05
Извиняюсь, я просто не знаю, какую информацию постить.
Вот:
System: Kernel: 5.4.0-100-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 5.2.7 Distro: Linux Mint 20.3 Una base: Ubuntu 20.04 focal Machine: Type: Laptop System: Acer product: Aspire F5-771G v: V1.51 serial: <filter> Mobo: Acer model: SpiderMan_SK v: V1.51 serial: <filter> UEFI: Insyde v: 1.51 date: 05/31/2019 Battery: ID-1: BAT1 charge: 16.3 Wh condition: 16.3/41.4 Wh (39%) model: PANASONIC AS16A5K status: Full CPU: Topology: Dual Core model: Intel Core i5-7200U bits: 64 type: MT MCP arch: Amber Lake rev: 9 L2 cache: 3072 KiB flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 21599 Speed: 703 MHz min/max: 400/3100 MHz Core speeds (MHz): 1: 733 2: 731 3: 760 4: 732 Graphics: Device-1: Intel HD Graphics 620 vendor: Acer Incorporated ALI driver: i915 v: kernel bus ID: 00:02.0 Device-2: NVIDIA GM107M [GeForce GTX 950M] vendor: Acer Incorporated ALI driver: nvidia v: 470.103.01 bus ID: 01:00.0 Display: x11 server: X.Org 1.20.13 driver: modesetting,nvidia unloaded: fbdev,nouveau,vesa resolution: 1920x1080~60Hz OpenGL: renderer: NVIDIA GeForce GTX 950M/PCIe/SSE2 v: 4.6.0 NVIDIA 470.103.01 direct render: Yes Audio: Device-1: Intel Sunrise Point-LP HD Audio vendor: Acer Incorporated ALI driver: snd_hda_intel v: kernel bus ID: 00:1f.3 Sound Server: ALSA v: k5.4.0-100-generic Network: Device-1: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter vendor: Lite-On driver: ath10k_pci v: kernel port: 4000 bus ID: 03:00.0 IF: wlp3s0 state: up mac: <filter> Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Acer Incorporated ALI driver: r8169 v: kernel port: 3000 bus ID: 04:00.1 IF: enp4s0f1 state: down mac: <filter> Drives: Local Storage: total: 1.13 TiB used: 869.06 GiB (75.2%) ID-1: /dev/sda vendor: Toshiba model: MQ01ABD100 size: 931.51 GiB ID-2: /dev/sdb vendor: Western Digital model: WDS240G2G0B-00EPW0 size: 223.57 GiB Partition: ID-1: / size: 219.06 GiB used: 27.72 GiB (12.7%) fs: ext4 dev: /dev/sdb1 ID-2: /home size: 907.65 GiB used: 841.26 GiB (92.7%) fs: ext4 dev: /dev/sda2 ID-3: swap-1 size: 7.87 GiB used: 80.2 MiB (1.0%) fs: swap dev: /dev/sda3 Sensors: System Temperatures: cpu: 48.0 C mobo: N/A gpu: nvidia temp: 50 C Fan Speeds (RPM): N/A Info: Processes: 295 Uptime: 2h 48m Memory: 7.64 GiB used: 5.80 GiB (75.9%) Init: systemd runlevel: 5 Compilers: gcc: 9.3.0 Shell: bash v: 5.0.17 inxi: 3.0.38
Роутер (точнее, абонентский терминал) NTE-RG-1421G-Wac.
Штатный файловый менеджер при попытке копирования виснет. DoubleCommander хотя бы просто ругается.
Монтировал командой
curlftpfs user:user@192.168.0.1 /home/hellerick/EltexDrive
-
Chocobo
- Сообщения: 9954
- Зарегистрирован: 27 авг 2016, 22:57
- Решено: 214
- Откуда: НН
- Благодарил (а): 795 раз
- Поблагодарили: 2980 раз
- Контактная информация:
Не копируются файлы через GUI
#4
19 фев 2022, 10:15
Вроде эта железка умеет раздавать и smb судя по характеристикам, попробуй может вместо ftp. Будет несколько логичней и гораздо отзывчивей чем curlftpfs)
Что до самой ошибки, возможно реализация ftp-сервера конфликтует с оберткой монтирования обламывая вызовы гуйных файлменеджеров, попробуй что-нибудь типа Filezilla, предназначенное для работы с ftp-серверами подключаясь им на тот же хост:порт
-
Hellerick
- Сообщения: 5
- Зарегистрирован: 19 фев 2022, 08:41
- Контактная информация:
Не копируются файлы через GUI
#5
19 фев 2022, 12:11
Я правильно понимаю, что для SMB мне нужно задавать что-то типа такого?
sudo mount -t cifs -o username=user,password=user,sec=ntlm,vers=1.0 //192.168.0.1/ /home/hellerick/EltexDrive
Но он мне упорно выдает «mount error(2): No such file or directory», и я не могу понять, почему.
А Filezilla работает, там всё нормально.
-
Chocobo
- Сообщения: 9954
- Зарегистрирован: 27 авг 2016, 22:57
- Решено: 214
- Откуда: НН
- Благодарил (а): 795 раз
- Поблагодарили: 2980 раз
- Контактная информация:
Не копируются файлы через GUI
#6
19 фев 2022, 12:28
Hellerick писал(а): ↑
19 фев 2022, 12:11
А Filezilla работает, там всё нормально.
Ну значит не дружит именно меж реализациями, что-то сломалось. Как минимум сам факт что
http://curlftpfs.sourceforge.net/
не обновлялась с 2008 уже ставит под вопрос ее пригодность для повседневного использования на любых сценариях)
Hellerick писал(а): ↑
19 фев 2022, 12:11
Я правильно понимаю, что для SMB мне нужно задавать что-то типа такого?
типа того. Если уже настроил в железяке что самба шара доступна в сети. Покажи скрин может как оно там настраивается, чтоб было наглядней.
Попробуй зайти в файловом менеджере по пути smb://192.168.0.1/ — в идеале должен показать после авторизации(или по гостевой) директории с шарами.
-
slant
- Сообщения: 4029
- Зарегистрирован: 21 июн 2017, 18:09
- Решено: 79
- Благодарил (а): 50 раз
- Поблагодарили: 1764 раза
- Контактная информация:
Не копируются файлы через GUI
#7
19 фев 2022, 12:56
Hellerick писал(а): ↑
19 фев 2022, 12:11
Я правильно понимаю, что для SMB мне нужно задавать что-то типа такого?
sudo mount -t cifs -o username=user,password=user,sec=ntlm,vers=1.0 //192.168.0.1/ /home/hellerick/EltexDrive
Неправильно. Нельзя смонтировать сам samba сервер (//192.168.0.1/). Потому и ошибка. Можно смонтировать одну из его шар — тех «папок» которые ты увидишь открывая адрес //192.168.0.1/
Т.е. там в строчке mount должно быть в качестве адреса что-то вроде //192.168.0.1/some_share — где some_share — имя шары, которые ты настроишь в интерфейсе роутера при настройке доступа к файлам.
-
Hellerick
- Сообщения: 5
- Зарегистрирован: 19 фев 2022, 08:41
- Контактная информация:
Не копируются файлы через GUI
#8
19 фев 2022, 13:44
В железяке я упорно никаких интересных настроек не вижу.
Когда я иду через «smb://192.168.0.1», я вижу, что расшарена папка «//192.168.0.1/public/disk1_1_share».
Когда я пишу команду
sudo mount -t cifs -o username=user,password=user,sec=ntlm,vers=1.0 //192.168.0.1/public/disk1_1_share /home/hellerick/EltexDrive
он мне выдает ошибку «mount error(20): Not a directory».
-
Chocobo
- Сообщения: 9954
- Зарегистрирован: 27 авг 2016, 22:57
- Решено: 214
- Откуда: НН
- Благодарил (а): 795 раз
- Поблагодарили: 2980 раз
- Контактная информация:
Не копируются файлы через GUI
#9
19 фев 2022, 14:12
Hellerick, через фм тоже внутрь шары не пускает по smb:// ?
-
Hellerick
- Сообщения: 5
- Зарегистрирован: 19 фев 2022, 08:41
- Контактная информация:
Не копируются файлы через GUI
#10
19 фев 2022, 14:32
Впускает. И файлы в файловом менеджере через smb:// копируются правильно.
В принципе, это практически решает проблему.
Вот только получается, что пользователю для доступа каждый раз придется вручную вбивать в адрессную строку этот «smb://192.168.0.1/», а это как-то неправильно.
Я даже как какой-то приличный ярлык для этого сделать, не знаю.
Последний раз редактировалось пользователем 1 Hellerick; всего редактировалось раз: 19
-
Chocobo
- Сообщения: 9954
- Зарегистрирован: 27 авг 2016, 22:57
- Решено: 214
- Откуда: НН
- Благодарил (а): 795 раз
- Поблагодарили: 2980 раз
-
Контактная информация:
Не копируются файлы через GUI
#11
19 фев 2022, 14:35
Hellerick, думаю с монтированием тоже можно разобраться, если необходимо)
А так, вроде во всех практически файлменеджерах можно добавить в боковую панель ссыль на эту шару для быстрого доступа тоже.
-
vir0id
- Сообщения: 2753
- Зарегистрирован: 19 дек 2017, 18:48
- Решено: 15
- Откуда: Рига
- Благодарил (а): 163 раза
- Поблагодарили: 305 раз
-
Контактная информация:
Не копируются файлы через GUI
#12
20 фев 2022, 07:15
Если к роутеру можно подрубиться по ssh то можно попробовать примонтировать диск с sshfs типа
Код: Выделить всё
sshfs root@192.168.0.1/sda1/public/disk1_1_share /home/hellerick/EltexDrive
Или штытным ФМ подключить диск прямо в папку EltexDrive