Welcome to the Linux Foundation Forum!

[setfacl] permission denied in both /tmp and /dev/shm

Options

Running lab 32.3. "Using Access Control Lists" in an Ubuntu 20.04 virtualbox, either in directory /dev/shm or in /tmp, brings the error:

-bash: /dev/shm/afile: Permission denied

The steps are:

  • with user1:
echo This is a file > /dev/shm/afile
getfacl /dev/shm/afile
setfacl -m u:user2:rw /dev/shm/afile
getfacl /dev/shm/afile
  • and then with user2:
echo another line > /dev/shm/afile

But the same procedure goes well under user1 home directory. The second user is added with sudo useradd -k /home/user1/ -m -s /bin/bash user2. The directory /dev/shm is of type tmpfs as shown with df -hT, and the type of /tmp doesn't appear.

Maybe I missed something?

Comments

Categories

Upcoming Training