1. CIFS
1) 将Windows下的某一目录设置为共享如F:\123
2) linux上建立挂载目录,如/mnt/abc
3) 以root身份执行挂载命令
mount -t cifs -o username=xxxx,password=xxxxx //10.0.2.x/123 /mnt/abc
4) 挂载后普通用户没有写权限,修改挂载命令为
mount -t cifs -rw -o username=xxx,password=xxx,gid="uuu",uid="uuu" //10.0.2.x/123 /mnt/abc
5) 设置权限
mount -t cifs -rw -o username=xxx,password=xxx,gid="uuu",uid="uuu",dir_mode=0755,file_mode=0644 //10.0.2.x/123 /mnt/abc
6) 错误
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
dmesg:
[2567839.880182] CIFS: Attempting to mount //172.16.3.100/my_xx
[2567839.882512] CIFS VFS: Unable to select appropriate authentication method!
[2567839.882516] CIFS VFS: Send error in SessSetup = -22
[2567839.882540] CIFS VFS: cifs_mount failed w/return code = -22
去掉 sec=ntlm
2. NTFS
ntfs-3g -o uid=1000,gid=1000,fmask=133,dmask=022 /dev/sdb1 /mnt