LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-26-2023, 12:21 PM   #1
reitsma
LQ Newbie
 
Registered: Dec 2002
Location: Corvallis, OR
Distribution: Ubuntu
Posts: 22

Rep: Reputation: 15
Simple Linux ACL problem... I must be missing something


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?

Last edited by reitsma; 09-26-2023 at 12:23 PM.
 
Old 09-26-2023, 08:46 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,360
Blog Entries: 28

Rep: Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148
I'm guessing it's likely a permissions issue, as /tmp is owned by root.
 
Old 09-29-2023, 01:09 PM   #3
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,914

Rep: Reputation: 5032Reputation: 5032Reputation: 5032Reputation: 5032Reputation: 5032Reputation: 5032Reputation: 5032Reputation: 5032Reputation: 5032Reputation: 5032Reputation: 5032
As long as the directory has 'x' permissions then that looks like it ought to work. /tmp is usually 1777, so I don't see why it would be a problem though.

Last edited by GazL; 09-29-2023 at 06:25 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Something depends on something else but something else is to be installed javascriptninja Linux - Newbie 3 02-05-2012 04:22 PM
problem with samba and ACL ,ACL does not work as I want golden_boy615 Linux - Server 1 12-18-2011 09:18 AM
Why does the ACL of a file created under a directory differ from the default ACL sctebnt Linux - Security 5 12-02-2011 08:13 AM
Problem with Vmware + Pam + I must be missing something subh8u Linux - Software 1 04-19-2009 12:21 AM
iptables acl versus cisco acl id_viorel Linux - Security 1 04-09-2008 05:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration