Terminal / Bash: Permission denied when appending to a file with RW rights granted by ACL
0
votes
0
answers
34
views
I have a file "test.log" inside a directory.
The directory has an accesslist, defined as:
0: user:Me allow list,add_file,delete_child,file_inherit
The file "test.log" (created by root) has automatically the following access rights:
-rw-r--r--+ 1 root wheel
0: user:Me inherited allow read,write
As "Me", I can open this file in Terminal – for example with nano – edit it, save the changes and exit nano.
Result: the file has been changed as expected.
When I use the following command:
echo "test" >> test.log
I get the error:
-bash: test.log: Permission denied
"Me" is a standard user.
When I
su
to an admin user, the admin user gets the same Permission denied error when executing echo "test" >> test.log
.
Even, as admin user, when I use sudo echo "test" >> test.log
I also get the Permission denied error. Only as root can I append text to the file using echo >>
.
I have no idea, how to fix that or what causes this behaviour.
Asked by CreaTurE
(31 rep)
Mar 12, 2025, 06:06 PM
Last activity: Mar 12, 2025, 08:36 PM
Last activity: Mar 12, 2025, 08:36 PM