when I use the following command:
$mount-t cifs //192.168.1.2/ Samba/MNT/Samba-o Username =test,password=test
mount samba share file gets the following error:
mount error 20 = Not a directory
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
a Google search revealed that the problem could be due to the cifs file system not being compatible with older samba Shared servers, so either upgrading the samba server program or restricting the cifs would be required to fix the problem. According to the online advice, you can use:
$echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled
modifies the cifs option to disable cifs extensions, and then mount is no problem.
but it was a bit cumbersome to do this every time I restarted, so I changed my system startup script so that I could put these mounts into my fstab and let the system mount automatically every time it was started. The methods are as follows:
modify /etc/init.d/netfs to add a line like the + sign in start as follows:
Case “$1” in the start)
+/sbin/modprobe cifs & amp; & echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled
…
first execute “/sbin/modprobecifs” to load the cifs module, otherwise the file we want to modify LinuxExtensionsEnabled may not exist yet, and the modification will fail. Since rc*.d/S**netfs at different boot levels are linked to /etc/init.d/netfs, this change takes effect for all boot levels. Of course, if your system is not such a link, it is the same to modify the corresponding file.
there will be no problem installing the samba Shared file system after the restart.
Read More:
- Samba mount directory file rename strange failure
- Mount error (22): invalid argument refer to the mount.cifs (8) manual page (
- cifs mount error(13): Permission denied
- Mount error (112): host is down
- Linux common problems and Solutions
- VIM e667: fsync failed error
- Add Samba user prompt failed to add entry for user
- ADB remount failed: operation not permitted
- Raspberry Pi 3 installation and software configuration issues collection
- Samba error: session setup failed: NT_ STATUS_ LOGON_ FAILURE
- Modify grub to solve computer startup error: error 17
- “Operation now in progress” appears when mounting CIFS
- /sbin/mount.vboxsf: mounting failed with the error: No such device
- Boot / etc/ rc.local What about invalidity? resolvent
- Samba shared server cannot be accessed and the path cannot be found
- Common problems and solutions under Linux
- docker:Failed to add /run/systemd/ask-password to directory watch: No space left on device
- Failed to add /run/systemd/ask-password to directory watch: No space left on device?
- failed: Too many links (How to Fix)
- Modify samba configuration, restart service failed