Samba+quota限制共享目录容量-熊二的日常的博客
source link: https://blog.51cto.com/9605182/2493194
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Samba+quota限制共享目录容量
前言:此处只针对xfs文件系统
1、编辑挂载文件 vi /etc/fstab,修改需要进行磁盘限额的挂载点,在defualt后面加入usrquota,grpquota
2、使用 mount -a重新挂载,然后查看mount | grep grpquota,如目标分区出现红框标识内容则说明修改成功
3、给用户限额(此处只限制软容量和硬容量,不限制文件数)例如:xfs_quota -x -c "limit -u bsoft=20g bhard=20g sxh" /home
(1)-u 表示给用户限额,bsoft和bhard分别为软容量和硬容量
(2)-g 表示给用户组限额
(3)sxh 这个是用户,根据实际情况写就ok
(4)/home 挂载点,就是你要限额的分区挂载目录
4、配置samba
(1)path:linux上需要共享的目录
(2)write list :谁有权限写入,对个用逗号分隔
5、重启samba服务,systemctl restart smb
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK