小程序框架kbone与Hybird混合开发
2527
2022-09-02
How to mount Windows share on Red Hat Enterprise Linux system using CIFS?
EnvironmentRed Hat Enterprise Linux 8Red Hat Enterprise Linux 7Red Hat Enterprise Linux 6Red Hat Enterprise Linux 5
IssueHow can Windows shares be mounted on Red Hat Enterprise Linux?ResolutionTo run the following commands, you need to install cifs-utils package which provides mount.cifs helper program. Some commands for mounting CIFS volume require the helper program to pre-process options before issuing a mount() syscall.Windows share can be mounted on RHEL system using cifs option of mount command as :
Raw
# mount -t cifs -o username=
You can specify iocharset to convert local path names to/from UTF-8 if the server uses multi byte charset:
Raw
# mount -t cifs -o iocharset=cp932,username=
In case your user is in windows domain then you can define the domain as follows:
Raw
# mount -t cifs -o username=
By default windows share mounted with the full permission (777) in Linux. To change the default permission use the dir_mode and file_mode options to set directory and file permission.
Raw
# mount -t cifs -o username=
To make the mount persistent across reboots, make the below entry to the /etc/fstab
Raw
//WIN_PC_IP/
If a username/password/domain is needed, it is best not to leave it in fstab. In order to achieve this, the previous entry can be modified like so:
Raw
//WIN_PC_IP/
and then create the file /root/.credfile, with the following content (domain might not be mandatory):
Raw
username=
If you receive the following error when try to mount the share folder from windows machines
Rawmount error(13): Permission deniedRefer to the mount.cifs(8) manual page (e.g. man mount.cifs)Please verify the permission on the folder on you windows machine and try again mount the share folder.
LINUX
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~