Use ACL to share writable directory with multiple users over sshfs?
I am trying to make it so that multiple users can connect via sshfs and have access to a directory (/fs) where they can modify or create files, either their own files or other peoples files. I am having trouble finding a way to force new files to be writable by the group.
## On Proxmox Host(s):
## On FileServer (Ubuntu 22.04 LXC Container):
## On Client:
## ACL before:
## ACL after:
When I create new files under /fs they do not seem to use the ACL I have set.
They instead use the standard permissions that you normally see when ACL is not present:
Notice Test2 and Test3 are not writeable by the group, this is what I am hoping to change, so that users can alter files within the /fs directory.
For some this might be a pretty basic question, but I have been reading documentation and trying most solutions I can find.
I really appreciate any help, thank you.
I am trying to make it so that multiple users can connect via sshfs and have access to a directory (/fs) where they can modify or create files, either their own files or other peoples files. I am having trouble finding a way to force new files to be writable by the group.
## On Proxmox Host(s):
Bash:
sudo zfs set acltype=posixacl rpool
sudo zfs set acltype=posixacl zpool
sudo zfs set aclinherit=passthrough rpool
sudo zfs set aclinherit=passthrough zpool
## On FileServer (Ubuntu 22.04 LXC Container):
Bash:
sudo apt install -y acl
sudo groupadd FSuser
sudo usermod -aG FSuser tom
sudo usermod -aG FSuser jerry
sudo usermod -g FSuser tom
sudo usermod -g FSuser jerry
sudo mkdir -p /fs/obsidian/Test
sudo chown root:FSuser /fs -R
sudo chmod -R g+wX /fs
sudo find /fs -type d -print0 | xargs -0 sudo chmod 770
sudo getfacl /fs
sudo setfacl -d -m group:FSuser:rwx /fs
sudo setfacl -m group:FSuser:rwx /fs
sudo getfacl /fs
## On Client:
Bash:
sudo mkdir /mnt/fs
sudo nano /etc/fstab
tom@fs:/fs /mnt/fs fuse.sshfs x-systemd.automount,ServerAliveInterval=15,reconnect,_netdev,allow_other,user,idmap=user 0 0
## ACL before:
Bash:
sudo getfacl /fs
getfacl: Removing leading '/' from absolute path names
# file: fs
# owner: root
# group: FSuser
user::rwx
group::rwx
other::---
## ACL after:
Bash:
sudo getfacl /fs
getfacl: Removing leading '/' from absolute path names
# file: fs
# owner: root
# group: FSuser
user::rwx
group::rwx
group:FSuser:rwx
mask::rwx
other::---
default:user::rwx
default:group::rwx
default:group:FSuser:rwx
default:mask::rwx
default:other::---
When I create new files under /fs they do not seem to use the ACL I have set.
They instead use the standard permissions that you normally see when ACL is not present:
Bash:
ls -alh
total 19K
drwxrwx--- 6 root FSuser 6 Jan 16 22:10 .
drwxrwx---+ 3 root FSuser 3 Jan 16 21:49 ..
drwxr-xr-x 2 tom FSuser 8 Jan 16 21:51 .obsidian
drwxrwx--- 2 root FSuser 3 Jan 16 21:49 Test
drwxr-xr-x 2 tom FSuser 2 Jan 16 21:52 Test2
drwxr-xr-x 2 tom FSuser 2 Jan 16 22:10 Test3
Notice Test2 and Test3 are not writeable by the group, this is what I am hoping to change, so that users can alter files within the /fs directory.
For some this might be a pretty basic question, but I have been reading documentation and trying most solutions I can find.
I really appreciate any help, thank you.
Last edited: