磁盘挂载
fdisk -l 当前磁盘信息
mount /dev/xvde1 /mnt 挂载到/mnt
df -h 查看当前磁盘分区
vi /etc/fstab 添加 /dev/xvde1 /mnt ext4 defaults 0 0
mount -a 不报错,挂载成功
挂载/dev/xvde1
root@lfgp000107599:/# blkid
/dev/xvda1: UUID="6a97d3cb-1a7f-418e-8750-7083de62a470" TYPE="swap" PARTUUID="c1132859-01"
/dev/xvda2: UUID="06d99e84-1bc4-4766-9db1-a7ab923a25f2" TYPE="ext3" PARTUUID="c1132859-02"
/dev/xvde1: UUID="cef249e6-6ac4-4fdb-be4d-915ef7e2faf7" TYPE="ext4" PARTUUID="a4811d7f-01
samba配置
https://www.howtoforge.com/samba-server-installation-and-configuration-on-centos-7
yum install samba samba-client samba-common
vi /etc/samba/smb.conf
[gen]
comment = share for huawei
path = /home/gen
available = yes
browseable = yes
public = yes
writable = yes
valid users=gen
[mnt]
path = /mnt
browsable =yes
writable = yes
guest ok = yes
read only = no
valid users = gen
public = yes
availabel = yes
确认 valid users对目录有读写权限 chmod
关闭selinux
非root用户dns无法使用
/etc/resolv.conf文件权限为640,不是644,非root用户无法读取,导致无法解析
网友评论