Linux File Permissions

Posted on 2012-09-12
Last Modified: 2012-09-17
I have a user that is a part of a group called "bcm" and user "brendan" is inside of that group. It is also that users primary group.

I have a list of files that list group bcm as owner, and have write access, yet when I open these files, they're read only. What am I doing wrong?

ls -al output from the folder with the files:
-rwxrwxr-x. 1 jshocki bcm    7023 Jul 26 07:15 temp2.log
-rwxrwxr-x. 1 jshocki bcm   29268 Jul 23 12:02 temp3.log
-rwxrwxr-x. 1 jshocki bcm      21 Jul 26 02:35 temp.log
Question by:brendan-amex
    LVL 68

    Accepted Solution

    The dot at the end of the permissions indicates that the files have an extended security context, as in SELinux.

    Use "getfattr" to display and "setfattr" to set/remove these attributes.

    General info is here:
    LVL 14

    Assisted Solution


    Open in new window

    to confirm which ID you are logged in with. Then type

    Open in new window

    to list which groups the current ID belongs to. Is bcm in that list?

    Author Comment

    Yes, whoami returns brendan and groups shows bcm and nfsnobody groups.
    LVL 68

    Expert Comment

    Didn't you notice my comment above?

    Please note that you must issue getfattr/setfattr with root privileges, acquired e. g. by means of "sudo".
    LVL 25

    Assisted Solution

    most likely, your file has an immutable flag or something of the sort.

    it may also be opened and locked for writing.

    and obviously woodmilkporc's suggestion to check for acls should be answered as well.

    depending on how you determine that the file is "read only" this may or may not be the case. most graphic editors will state that the file is read-only regardless of the case.

    please give the required information, and possibly try "echo stuff >> temp.log" and let us know the result

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
    Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
    In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now