cifs

QDir hangs on accessing CIFS remote folder when disconnected

梦想与她 提交于 2020-01-03 02:23:10
问题 I'm using Qt 4.7 on CentOS 6.0. I have a remote share folder mounted with CIFS: mount -t cifs //PC128/mnt /media/net -o username=user,password=pwd,rw,noexec,soft,uid=user,gid=user When remote folder is somehow incorrectly disconnected (e.g. the network cable is pulled out) my application hangs because of QDir locks on attempt to touch the folder (e.g. QDir::exists call). After ~90 seconds it unlocks and returns false. It looks right - the timeout to 回答1: QDir uses synchronous file API. When

Shell script to mount windows network location in linux machine

可紊 提交于 2019-12-25 16:48:15
问题 I have two questions here. I am able to mount a windows network path in my Ubuntu machine by doing following: sudo mount -t cifs -o username=user \\\\my_windows\\test /net/loc All the files and folders present in Windows machine is now available in Ubuntu machine with path '/net/loc'. Here are my doubts: I can see all files of windows in linux path. Is it possible to create files/folders in Linux path(the mount path where windows path is mounted) and it will be reflected in Windows machine? I

What is folder (null).1001.1001

99封情书 提交于 2019-12-25 04:33:34
问题 (null).1001.1001 What is this folder? Where does it come from? drwxrwxrwx 49 appusr appusr 4096 Jan 7 21:52 (null).1001.1001 I think it has something to do with Mr. Root impersonating Mr. AppUsr in a background task, but I posted to AskUbuntu last week, and nobody there recognized it. Why am I asking? Well ... On an Ubuntu box, I have a restricted-access applications user who is uid 1001 and gid 1001 . Root launches Rserve under that user during boot. The Rserve session is writing into a

nfs encoding issue

北慕城南 提交于 2019-12-25 03:14:04
问题 I have a Celerra NS-20 that export a filesystem with cifs and nfs. The files are written by windows machines. When I mount the cifs in linux all filename special characters are ok, but when mount the nfs (same filesystem) the filenames special character are broken. Are there a way to mount the filesystem changing the encoding ? 回答1: We have the same issue with a new VNX 5300 and the resolution was to enable the NFSv4 protocol in the VNX, by default its only support v3. For that, edit: /nas

Debian 7, fstab, mount.cifs Invalid argument

随声附和 提交于 2019-12-22 18:57:10
问题 I try to mount cifs, but i have got following error and i don't find the error. ~# mount -a ~# mount error(22): Invalid argument I try if in my /etc/fstab //192.168.0.1/ShareRep /home/user/share cifs credentials=/usr/local/etc/whisper.credentials,uid=501,sec=ntml 0 0 my credentials file /usr/local/etc/whisper.credentials username=user password=password I am on Debian 7.6 回答1: In the absence of a more detailed error from dmesg I do see one typo that will cause things to fail. You have the

linux搭建smb、挂载smb、Windows共享

淺唱寂寞╮ 提交于 2019-12-17 05:27:59
实现Linux系统之间共享文件资源以及在Linux系统与Windows系统之间共享文件 Samba软件包的构成 服务端:samba 客户端:samba-client 公共组件:samba-common Smbd:负责为客户机提供服务器中共享资源(目录和文件)的访问,监听139端口(smb协议),445端口(cifs协议) Nmbd:负责提供基于netblos协议的主机名称解析,以便为windows网络中的主机进行查询服务,监听137-138端口(netblos协议) Samba服务的程序组件 主配置文件路径 /etc/samba/smb.conf 配置文件参数解释 [global] #全局参数。 workgroup = MYGROUP #工作组名称 server string = Samba Server Version %v #服务器介绍信息,参数%v为显示 SMB版本号 log file = /var/log/samba/log.%m #定义日志文件的存放位置与名称, 参数%m为来访的主机名 max log size = 50 #定义日志文件的最大容量为50KB security = user #安全验证的方式,总共有4种 #share:来访主机无需验证口令;比较方便,但安全性很差,7.0以上系统不支持share, 使用user模式,map to guest=bad

linux访问windows共享文件夹的两种方法

守給你的承諾、 提交于 2019-12-15 14:42:05
摘自:https://www.cnblogs.com/dengtang/p/11630482.html 有时需要在linux下需要访问windows的共享文件夹,可以使用mount挂载或者使用samba连接。 1、mount挂载 首先创建被挂载的目录: $ mkdir windows将共享文件夹挂载到windows文件夹: $ sudo mount -t cifs -o username=share,password=share //192.168.66.198/share ./windows其中几个参数表示含义:cifs:Common Internet File System,可以理解为网络文件系统。usrname:访问共享文件夹的用户名password:访问密码//192.168.66.198/share:表示网络文件夹的地址,注意这里最后不能加/,如果是//192.168.66.198/share/则会报如下错误:mount: //192.168.66.198/share/ is not a valid block deviceTips:使用mount挂载的方法在系统重新启动后就会失效,如果希望开机时自动挂载,将下面设置加入/etc/fstab文件最后面就可以了。 //192.168.66.198/share /home/windows cifs defaults

win10 mount error 112 : host is down解决方案

安稳与你 提交于 2019-12-15 14:41:32
摘自:https://www.baidu.com/link?url=xZrOVRqR9gqGRq0esfVaivByR9E5-ixyAuKsQ_8Hiedl1sY6J7ezBlgSW3oe_X-koo2k0zfP0mHp0hKvZeVBUzR_0Elr_obQymIYHl5AE43&wd=&eqid=8af79857002f811e000000035df5c941 安装好Win10操作系统之后,使用ssh mount -t cifs //IP/共享目录 /mount挂载点的命令时候,提示 mount error(112): Host is down Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) 解决方案如下: 在控制面板->程序和功能->启动或关闭windows更能中勾选SMB的相关项,之后重启电脑即可 点赞 3 来源: https://www.cnblogs.com/LiuYanYGZ/p/12043943.html

jcifs.smb.SmbException: Access is Denied. exception for smb directories

若如初见. 提交于 2019-12-13 00:12:07
问题 In the below code statement: SmbFileInputStream din==new SmbFileInputStream(src); I am trying to create a SmbFileInputStream object. This will works fine if SmbFile 'src' is a file, but if 'src' is a smb Directory then it throws exception: jcifs.smb.SmbException: Access is Denied. at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:622) at jcifs.smb.SmbTransport.send(SmbTransport.java:722) at jcifs.smb.SmbSession.send(SmbSession.java:262) at jcifs.smb.SmbTree.send(SmbTree.java:119) at

transparent access to files on Samba shares on Linux et al. using C++ IO streams

狂风中的少年 提交于 2019-12-11 05:23:40
问题 Is it possible to open files on Samba shares using C++ IO streams in Linux as transparently as on Windows using just UNC path (or similar) or do I always need some kind of 3rd party library? If a 3rd party library is the only solution, what 3rd party libraries are there for Samba shares access? 回答1: It looks like you just want to mount the remote server using cifsfs (see "man mount.cifs"), and then access the files from the mount point you specified. There is no way that you can explicitly