Debian 服务器由多人使用。每个用户都有自己的帐户。用户在 中上传和使用大型二进制文件/opt/cache
。如果/opt/cache
已满,上传者会rm -r $(ls -t | tail)
删除最旧的二进制文件(可能分组到子文件夹中)。
用户经常无法清除缓存,因为文件具有644
权限。我能否以某种方式允许所有用户删除 的内容/opt/cache
,而不管已上传了什么内容?
我已完成以下操作以将每个文件分配给该cache_users
组,但如果文件不是组可写的,则这无济于事:
chown blabla:cache_users /opt/cache
setfacl -Rdm u::rwx,g::rwx,o::rwx /opt/cache
chmod 2775 /opt/cache