[Lab 6.3] Is Ubuntu ignoring my facl?
My current setup has 3 bare metal servers with
- Ubuntu 23.10 with kernel 6.5.0-25-generic (minimal install but later
unminimized to server) - openSUSE Tumbleweed 20240313 with kernel 6.7.9-1default
- CentOS Stream release 9 with kernel 5.14.0-427.el9.x86_64
To begin with, unlike on openSUSE and CentOS, on Ubuntu I needed to sudo apt install acl.
When I create the file and set its acl on the three of them:
[albert] touch /tmp/file [albert] setfacl -m u:rocky:rw /tmp/file
The permissions for /tmp are drwxrwxrwt on all of them and the permissions for /tmp/file are:
-rw-rw-r--+on openSUSE and CentOS-rw-rw----+on Ubuntu
On openSUSE and CentOS, when I execute getfacl /tmp/file, I get
getfacl: Removing leading '/' from absolute path names # file: tmp/file # owner: albert # group: albert user::rw- user:rocky:rw- group::r-- mask::rw- other::r--
while on Ubuntu I get
getfacl: Removing leading '/' from absolute path names # file: tmp/file # owner: albert # group: albert user::rw- user:rocky:rw- group::rw- mask::rw- other::---
However, when I sudo -s -u rocky and echo "12345" >> /tmp/file, on openSUSE and CentOS it works, but on Ubuntu I get
rocky@ubuntu:~$ echo "12345" >> /tmp/file bash: /tmp/file: Permission denied
I checked it and ACLs were enabled on the filesystem (ext4). On /etc/fstab the mount options were set to default, and when I checked those defauts
rocky@ubuntu:~$ sudo tune2fs -l /dev/disk/by-id/****** tune2fs 1.47.0 (5-Feb-2023) Filesystem volume name: <none> Last mounted on: / ... Default mount options: user_xattr acl ...
Therefore my question is
What the heck is wrong with Ubuntu?
Comments
-
My Ubuntu's /etc/fstab:
# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/ubuntu-vg/ubuntu-lv during curtin installation /dev/disk/by-id/dm-uuid-LVM-********** / ext4 defaults 0 1 # /boot was on /dev/sda2 during curtin installation /dev/disk/by-uuid/************* /boot ext4 defaults 0 1 /swap.img none swap sw 0 0
0 -
Surprisingly the read permission works:
rocky@ubuntu:~$ cat /tmp/file 12345 rocky@ubuntu:~$ echo "aaaaa" >> /tmp/file bash: /tmp/file: Permission denied
Moving the file to another directory within /tmp as mentioned in this post didn't work either.
0 -
Hi @albertgoma, I did a test on Ubuntu 23.10 and the original solution didn't work (on /tmp/afile). But the workaround I provided on https://forum.linuxfoundation.org/discussion/863781/lab-6-3-file-permissions-issue-first-post-question worked!
So, if you want to keep working the issue, please send me details of the commands you are running, because it worked for me if I put the file on /tmp/test/afile .
Regards,
Luis.0 -
Hi @luisviveropena, thanks for your reply. In my case that workaround didn't. It's great to know on Ubuntu 23.10 it actually did work for you. My intuition now tells me the issue must be related to installing a minimal version of the OS and later unminimizing it (maybe the config files and/or lib dependencies didn't end up being identical to those of the default Ubuntu Server install?) so reinstalling it as Ubuntu Server should, as a last resource, solve the problem.
Of course, as I managed to do the lab on OpenSUSE and CentOS, I moved on with the lessons. But I'm intrigued with this issue, so I'm coming back to it every now and then.
What I learned from my experience is that when things don't work as they should you end up learning more than when they do.
I'll keep this thread updated if I have further findings.
0 -
albertgoma,Hi @luisviveropena, thanks for your reply. In my case that workaround didn't. It's great to know on >Ubuntu 23.10 it actually did work for you. My intuition now tells me the issue must be related to >installing a minimal version of the OS and later unminimizing it (maybe the config files and/or lib >dependencies didn't end up being identical to those of the default Ubuntu Server install?) so >reinstalling it as Ubuntu Server should, as a last resource, solve the problem.
Oh, that's interesting. You could be able to find some differences between the distros using diff, or perhaps md5sum

What I learned from my experience is that when things don't work as they should you end up learning >more than when they do.
Yep, it's like that.
Many regards,
Luis.0
Categories
- All Categories
- 175 LFX Mentorship
- 175 LFX Mentorship: Linux Kernel
- 745 Linux Foundation IT Professional Programs
- 372 Cloud Engineer IT Professional Program
- 168 Advanced Cloud Engineer IT Professional Program
- 73 DevOps IT Professional Program - Discontinued
- 3 DevOps & GitOps IT Professional Program
- 98 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- AI & ML Training
- Blockchain & Decentralized Identity Training
- Cloud & Containers Training
- Cybersecurity Training
- DevOps & Site-Reliability Training
- Linux Kernel Development Training
- Networking Training
- Open Source Best Practice Training
- System Administration Training
- System Engineering Training
- Web & Application Development Training
- 2 LFD103-JP クラス フォーラム
- 4 LFD210-CN Class Forum
- 764 LFD259 Class Forum
- 681 LFS101 Class Forum
- 2 LFS158-JP クラス フォーラム
- 162 LFS207 Class Forum
- 3 LFS207-DE-Klassenforum
- 4 LFS207-JP クラス フォーラム
- 61 LFS241 Class Forum
- 52 LFS242 Class Forum
- 42 LFS243 Class Forum
- 19 LFS244 Class Forum
- 4 LFS250-JP クラス フォーラム
- 166 LFS253 Class Forum
- 19 LFS256 Class Forum
- 1.4K LFS258 Class Forum
- 165 LFS261 Class Forum
- 26 LFS267 Class Forum
- 792 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 87 Storage
- 768 Linux Distributions
- 81 Debian
- 67 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 106 Mobile Computing
- 18 Android
- 73 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 392 Off Topic
- 121 Introductions
- 181 Small Talk
- 29 Study Material
- 944 Programming and Development
- 310 Kernel Development
- 616 Software Development
- 977 Software
- 369 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)