Score:0

sudo chmod 755 [file]: operation not permitted!

lc flag

I wanted change the permission of a file that I own previously, so I typed:

$ sudo chmod 755 [file]
[sudo] password for rakinar2:
sudo: chmod: Operation not permitted

How do I fix this issue? I'm using ubuntu bionic.

EDIT [11 Jul 2021]: I run lsattr [file] and it says Permission denied while trying to stat [file]

vanadium avatar
cn flag
Operation not permitted means you cannot change it. Reason might be that the file system is read only. If it normally should not be read only, then include information about it in your question. Is it a file on your root partition? Is it a file in your home folder? If not, what is the file system? The command `lsblk -ls -fs` provided info on your file systems, including the mount point.
lc flag
@vanadium I was at `/home/rakinar2` and the partition was writable.
vanadium avatar
cn flag
Use "edit" to add any information that could be relevant to solve the problem to your question. Comments may disappear anytime. Normally, when a partition is writable, root can change permissions of a file, so something else is going on here.
waltinator avatar
it flag
Explore your permission/ownership problems with `https://github.com/waltinator/pathlld`. A `bash` script to answer "Why can't I Read/Write that file?".
nobody avatar
gh flag
`lsattr "your file"` please show it.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.