0

I'm getting "operation not permitted" even though I am in the group that owns the folder (and parent folder).

[acoder@box documents]$ chmod 770 customer123/
chmod: changing permissions of 'customer123/': Operation not permitted

Overview of directory:

[acoder@box documents]$ tree ../documents/

documents/
└── customer123
    ├── c1.pdf 
    ├── c2.pdf
    └── c3.pdf

Ownership & permissions:

[acoder@box documents]$ ll ../documents/
drwxrwx---. 5 apache salesteam 41 Apr 30  2019

[acoder@box documents]$ ll ../documents/customer123/
-rwxrwx---. 1 apache salesteam 32300 Apr 30  2019 c1.pdf
-rwxrwx---. 1 apache salesteam 31301 Apr 30  2019 c2.pdf
-rwxrwx---. 1 apache salesteam 33300 Apr 30  2019 c3.pdf

User acoder is in group salesteam:

cat /etc/group

acoder:x:1000:
salesteam:x:1001:acoder

I'm at a loss why I am getting Operation not permitted here. What am I missing?

1 Answer 1

1

From the syscall chmod man page...

The effective UID of the calling process must match the owner of the file, or the process must be privileged

In other words, only the owner or an id with raised permissions can change permissions. Why this is also not in the exe's man page, I do not know.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .