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?

asked 5 months ago348 views
2 Answers
0
Accepted Answer

Fixed it with setfacl:

sudo setfacl -R -m u:ubuntu:rwx /fsx
answered 5 months ago
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
SUPPORT ENGINEER
answered 5 months ago
  • 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/

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions