0

I'm trying to change permissions of a file that my user does not directly own, but my user is in a group that does have ownership of the file.

Here are the current permissions of the file. I am logged in as user_a

-rwxrwx---.  1 user_b  mygroup   145 Sep 28 15:53 /filepath

I run the command chmod +x /filepath and I am met with the error:

chmod: changing permissions of '/filepath': Operation not permitted

We have several users working on our linux computer, and we've all been added to mygroup. How can I make it so that we can change rwx permissions of each others files without using sudo?

0

Only root (i.e. UID 0) or a process with CAP_FOWNER can change the permissions of a file it does not own.

The most suitable approach is probably sudo.

Only root (i.e. UID 0) or a process with CAP_CHOWN can change the owner of a file.

  • So what you're telling me is that only root, and the current owner of the file can change permissions. Do I also have to be the owner in order to change ownership of the file? – Michael Oct 6 '17 at 21:25
  • @Michael Yes; that is more or less the same problem. – Hauke Laging Oct 6 '17 at 21:33
  • I see, guess I'll have to solve this in a different direction. Thank you! – Michael Oct 6 '17 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.