Linux挂载Win共享文件夹 一
1, Win下选中文件夹,属性设置为共享,红圈中的为共享路径,挂载时//ip/共享路径
2,
3,Linux需要安装这两个软件
rpm -qa | grep samba-client
rpm -qa | grep cifs=utils
else
yum install samba-client
yum install cifs-utils
4,
可能提示
创建成功
如果需要每次系统启动都挂载这个目录,那就需要在/etc/fstab 文件里把需要挂载项添加进去
添加行:
//192.168.1.100/workspace /mnt/share cifs auto,username=‘echo’,password=‘123456’ 0 0
通过linux 的mount命令挂载windows下的共享目录,挂载后目录权限为755,普通用户没有权限写入。
chmod给目录加权限出现错误,和普通的目录不同。
通过linux的 man mount.cifs 简单的了解下。
NAME
mount.cifs - mount using the Common Internet File System (CIFS)
cifs的意思是通用网络文件系统。
DESCRIPTION
This tool is part of the cifs-utils suite.
mount.cifs mounts a Linux CIFS filesystem. It is usually invoked indirectly by the mount(8) command when using the "-t cifs" option. This command only works in Linux, and the kernel must support the cifs filesystem. The CIFS protocol is the successor to the SMB protocol and is supported by most Windows servers and many other commercial servers and Network Attached Storage appliances as well as by the popular Open Source server Samba.
mount.cifs用于挂载linux的CIFS文件系统,当用-t cifs命令的时候间接的涉及了mount(8)命令。这个命令只能在linux上执行,以及内核必须支持cifs文件系统。cifs协议的前身是smb协议,被大部分的windows、商业服务器、存储应用支持。(mount.cifs跟mount -t cifs唯一的区别就是mount.cifs在samba软件包里,而mount在util-linux软件包里。)
The mount.cifs utility attaches the UNC name (exported network resource) specified as service (using //server/share syntax, where "server" is the server name or IP address and "share" is the name of the share) to the local directory mount-point.
mount -t cifs 192.168.50.34:temp /root/aa 通过类似的形式使用。192.168.50.34是windows的ip地址,temp目录是windows的共享目录。
Options to mount.cifs are specified as a comma-separated list of key=value pairs. It is possible to send options other than those listed here, assuming that the cifs filesystem kernel module (cifs.ko) supports them. Unrecognized cifs mount options passed to the cifs vfs kernel code will be logged to the kernel log.
mount.cifs causes the cifs vfs to launch a thread named cifsd. After mounting it keeps running until the mounted resource is unmounted (usually via the umount utility).
mount.cifs 挂载后会有一个cifsd进程出现。
继续查看下mount.cifs的语法。
file_mode=arg
If the server does not support the CIFS Unix extensions this overrides the default file mode.
dir_mode=arg
If the server does not support the CIFS Unix extensions this overrides the default mode for directories.
可以通过file_mode 和dir_mode 来设置权限,覆盖默认的755权限。
mount -t cifs //192.168.50.34/temp /root/aa -o username=allenli,password=lcc201314,rw,dir_mode=0777,file_mode=0777
Linux挂载Win共享文件夹 一的更多相关文章
- Linux挂载Win共享文件夹_VmwareTools
- Linux 挂载windows共享文件夹
Linux 挂载windows共享文件夹 准备工具: 1.windows 共享出来文件夹. 2.Linux 安装cifs文件挂载属性 3.其他 windows ip: 192.168.27.99 Li ...
- Linux 挂载Windows共享文件夹和NAS存储
summary: [Linux 挂载共享存储] 概述 将Windows共享文件夹和NAS存储挂载至Linux. Linux系统环境:CentOS 挂载共享存储 查看外部主机共享了哪些目录 smbcli ...
- linux挂载windows共享文件夹
1.建立共享文件夹 2.在linux中挂载共享目录 #mount -t cifs -o username=administrator,password=你的系统账号密码 //192.168.0.22/ ...
- linux挂载windows共享文件夹出错,提示mount error(13): Permission denied
完整的可以工作的命令行: mount -v -t cifs -o username=clouder,password=123456,iocharset=utf8,sec=ntlm //172.28.1 ...
- Linux挂载NAS共享文件夹
[root@ftp:/mnt] > mount -o username=user01,password=1234567890 //192.168.31.20/share /mnt/nas [ro ...
- VMware下Linux虚拟机访问本地Win共享文件夹
VMware下Linux虚拟机访问本地Win共享文件夹 : 访问共享文件夹的步骤如下: 1.先在本地Win创建一个需要共享到虚拟机中的共享目录,如 F:\share. 2.打开你的VMware,选择 ...
- linux上挂载windows共享文件夹
linux上挂载windows共享文件夹 1.共享windows目录 挂载之前得创建一个有password的用户(当前用户也能够),并将你要挂载的目录进行共享,并赋予读写权限 如图. watermar ...
- VMware,win7与linux centos6.4文件互传,linux下挂载windows共享文件夹,vmware tools安装方法
本方法是以win7,VMware9.0.1 ,centos6.4为基础实验的. 对于linux的初级使用阶段,都会Windows中使用linux虚拟机VMWare或者其它的.在Windows与linu ...
随机推荐
- cc++面试------17道经典面试题目分析
以下是C/C++面试题目,共计17个题目,其中涵盖了c的各种基础语法和算法, 以函数接口设计和算法设计为主.这17个题目在C/C++面试方面已经流行了多 年,大家需要抽时间掌握好,每一个题目后面附有参 ...
- 台式机上如何配置并使用苹果iPhone的耳机麦克风 并且麦克风开启降噪功能
这个资料和技巧在网络上面很少有人分享,但是可能会有不少人需要这个东西.这里分享下经验.这也是一个困扰我很久的一个问题.因为买来了这个转接头,发现,录音的时候iPhone的耳机麦克风有很大的噪音无法消除 ...
- ECSHOP和SHOPEX快递单号查询EMS插件V8.6专版
发布ECSHOP说明: ECSHOP快递物流单号查询插件特色 本ECSHOP快递物流单号跟踪插件提供国内外近2000家快递物流订单单号查询服务例如申通快递.顺丰快递.圆通快递.EMS快递.汇通快递.宅 ...
- JQ 封装全选函数
单击时触发效果: 如果有一个没有选中把全选的勾去了,如果select所有的都选中了,那就把全选勾上 html里: <div class="row cl"> <la ...
- Excel VBA表格自行开发计划
Excel VBA表格自行开发计划 要求功能 1. 批量删除 2. [X] 批量填充 3. [X] 批量重命名 4. [ ] 按颜色求和 5. [ ] 按底纹色选中单元格 6. [ ] 统计底纹颜色个 ...
- python学习之常用模块
- HyperLedger Fabric 1.4 超级账本组织(5.3)
超级账本组织分为TSC(技术指导委员会).Governing Board(董事会成员).LF Staffs(工作人员)三个组织,组织架构图如下: TSC:技术指导委会员,主导社区的开发工作,下设多个工 ...
- (数据科学学习手札35)tensorflow初体验
一.简介 TensorFlow时谷歌于2015年11月宣布在Github上开源的第二代分布式机器学习系统,目前仍处于快速开发迭代中,有大量的新功能新特性在陆续研发中: TensorFlow既是一个实现 ...
- java入门---简介&简单输出小例子&开发前准备
Java是由Sun Microsystems公司于1995年5月推出的Java面向对象程序设计语言和Java平台的总称.由James Gosling和同事们共同研发,并在1995年正式推出.J ...
- CSS3单选动画
本示例实现了两种单选按钮动画效果,一种是缩放,一种是旋转,以下是html布局以及css样式 html:这里使用了label标签的for属性,以此来绑定radio <div class=" ...