Article 6F359 Simple Linux ACL problem... I must be missing something

Simple Linux ACL problem... I must be missing something

by
reitsma
from LinuxQuestions.org on (#6F359)
In playing with ACL (Ubuntu 22.04 LTS) I'm immediately running into a problem.

As me:

$ touch /tmp/foo
$ setfacl -m u:test_user:rw /tmp/foo
$ getfacl -p /tmp/foo
# file: /tmp/foo
# owner: me
# group: me
user::rw-
user:test_user:rw-
group::rw-
mask::rw-
other::rw-


So far so good.
Next, I log in as test_user

$ cd /tmp
$ getfacl foo
# file: /tmp/foo
# owner: me
# group: me
user::rw-
user:test_user:rw-
group::rw-
mask::rw-
other::rw-


...still good.
But now (still as test_user):

$ echo something >> foo
sh: 4: cannot create foo: Permission denied
$ echo something >> /tmp/foo
sh: 4: cannot create foo: Permission denied


The same happens when I create the file foo in my own (home) directory instead of in /tmp (I tried that first and when that did not work I figured I'd try /tmp)

What am I missing? Why can test_user not write to the file?
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments