FSx for Lustre Mount Permissions for EC2 User

0

We're testing the waters with FSx Lustre. I have successfully mounted an FSx Lustre file system on a 20.04 Ubuntu EC2 using:

sudo mount -t lustre -o relatime,flock fs-876ac86ac865f978.fsx.ap-southeast-2.amazonaws.com@tcp:/hgd765f4 /fsx

However, the default EC2 user, ubuntu, has no rights to the file system. Only root does.

How do I mount the file system in such a way that ubuntu has R/W to it, or do I need to use facl or similar to modify the file system after mounting?

已提問 6 個月前檢視次數 430 次
2 個答案
1
已接受的答案

Fixed it with setfacl:

sudo setfacl -R -m u:ubuntu:rwx /fsx
已回答 5 個月前
profile picture
專家
已審閱 11 天前
0

Hello,

You can grant other users permissions to the FSx for Lustre file system by editing either the ownership or the POSIX permissions of the mount point (for eg., /fsx).

A user with root privileges can grant other users access to the file system as follows:

  1. To change the ownership to a non-root user and group, use the following:
$ sudo chown user:group /fsx

For example:

sudo chown ubuntu:ubuntu /fsx
  1. To change permissions of the file system to something more permissive, use the following:
$ sudo chmod 777 /fsx

This would then apply to all EC2 instances that have the file system mounted.

AWS
支援工程師
已回答 6 個月前
  • Unfortunately that doesn't work. The permissions assigned to the mount point get overwritten when the file system get mounted.

    Before mount: drwxrwxrwx 2 ubuntu ubuntu 4096 Dec 6 21:41 fsx/

    After mount: drwxr-xr-x 4 root root 33280 Dec 5 22:18 fsx/

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南