java访问glusterfs_GlusterFS: 访问权限设置

本文介绍了如何在GlusterFS中设置POSIX访问控制列表(ACLs),允许为不同用户或组分配不同权限,即使他们不属于原始所有者或拥有组。通过setfacl和getfacl命令激活和管理ACLs,确保文件系统的安全访问。
摘要由CSDN通过智能技术生成

GlusterFS: 访问权限设置

GlusterFS支持基于POSIX Access Control Lists的访问权限设置,在Ubuntu或者类似的系统上,只需要使用setfacl或getfacl来进行操作即可。

POSIX Access Control Lists (ACLs) allows you to assign different permissions for different users or groups even though they do not correspond to the original owner or the owning group.

For example: User john creates a file but does not want to allow anyone to do anything with this file, except another user, antony (even though there are other users that belong to the group john).

This means, in addition to the file owner, the file group, and others, additional users and groups can be granted or denied access by using POSIX ACLs.

Activating POSIX ACLs Support

To use POSIX ACLs for a file or directory, the partition of the file or directory must be mounted with POSIX ACLs support.

Activating POSIX ACLs Support on Server

To mount the backend export directories for POSIX ACLs support, use the following command:

# mount -o acl

For example:

# mount -o acl /dev/sda1 /export1

Alternatively, if the partition is listed in the /etc/fstab file, add the following entry for the partition to include the POSIX ACLs option:

LABEL=/work /export1 ext3 rw, acl 14

Activating POSIX ACLs Support on Client

To mount the glusterfs volumes for POSIX ACLs support, use the following command:

# mount –t glusterfs

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值