Exercise: Filesystem ACLs

step5 is not working for me as its mentioned on the linux academy. because for me am able to run that command without any issue. could someone please help me.user_236314_5bfb4a9d35a49.PNG
  • post-author-pic
    Rob M
    11-26-2018

    Howdy,

    You're able to echo into the file because you're running the command as the owner of the file. It takes a different command to revoke write permissions from yourself as the owner of the file.
    The exercise has you create the files and modify the ACLs as root and then try to write as starbuck.

    For example,

    [rob@server tmp]$ getfacl file3
    # file: file3
    # owner: rob
    # group: rob
    user::rw-
    group::rw-
    other::r--

    [rob@server tmp]$ setfacl -m m::r file3
    [rob@server tmp]$ getfacl file3
    # file: file3
    # owner: rob
    # group: rob
    user::rw-
    group::rw- #effective:r--
    mask::r--
    other::r--

    [rob@server tmp]$ echo foo > file3
    [rob@server tmp]$ getfacl file1
    # file: file1
    # owner: root
    # group: root
    user::rw-
    user:rob:rw- #effective:r--
    group::r--
    mask::r--
    other::r--

    [rob@server tmp]$ echo foo > file1
    bash: file1: Permission denied

    If you have any questions please let me know!


  • post-author-pic
    Iyyappan M
    11-27-2018

    Thanks Rob. let me try again.

Looking For Team Training?

Learn More