linux mount 远程目录文件拷贝,嵌入式linux设备mount windows共享文件

方法/步骤

mount -t cifc "windows共享文件夹" "Linux /mnt路径"

i.e. mount -t cifs //16.187.190.60/test /mnt/

Linux 会要求输入访问Windows 共享文件夹上的密码。

注意:

Linux中提示:

Unable to find suitable address.

说明远程共享文件夹路径不存在。请仔细检查,并更正目录路径。

mount -t cifc "windows共享文件夹" "Linux /mnt路径"

i.e. mount -t cifs //16.187.190.50/test /mnt/

注意:

Linux中提示:

mount error(13): Permission denied

Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

解决方案:将访问Windows共享目录的用户名和密码直接加入到命令中。

mount -t cifs -o username=WindowsLogin,password="passwordinWindows"

//16.187.190.50/test /mnt/

注意:该命令中,username为windows上的用户;password为window用户对应的密码

步骤3的命令也可以使用以下方式实现:

mount.cifs -o username="Administrator",password="PasswordForWindows" //16.187.190.50/test /mnt/

通过步骤3和步骤4可以成功将windows共享文件夹挂载在/mnt目录下。不过由于mount命令只能由root权限用户使用。其挂载文件夹的默认owner和group都为root,并且不能通过chmod命令更改权限。

使用mount命令,给挂载共享文件夹指定owner和group.

mount.cifs -o username="Administrator",password="PasswordForWindows",uid=Mysa,gid=Mysa //16.187.190.50/test /mnt/

检查/mnt/中文件夹的owner和group。

更改文件夹权限。给mount共享文件夹所在组的写权限。

mount.cifs -o username="Administrator",password="PasswordForWindows",Mysa,gid=Mysa,dir_mode=0777 //16.187.190.50/test /mnt/

取消

评论

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值