redconservatory
redconservatory

Reputation: 21924

How can I get chmod -R to work for me? (operation not permitted)

When I try to do something like:

chmod -R ug+rw files

On a folder with existing content I get:

chmod: Unable to change file mode on [fill in the blank]: Operation not permitted.

It's on a site on my own computer (which I am the admin of).

Upvotes: 1

Views: 8112

Answers (2)

paulguy
paulguy

Reputation: 1105

On my mac I found I needed to run this:

chflags -R nouchg /path/to/folder

Upvotes: 0

Ken Thomases
Ken Thomases

Reputation: 90521

Do sudo chmod -R ug+rw files. You have to be the owner of all of the files to change the permissions, unless you're operating with root privileges.

Upvotes: 1

Related Questions