recently we had to transfer some files between our servers(both ubuntu server 18.04). apparently the person who did this, didn't use the -a
option of rsync
(to preserve ownership information). So now, those files in the new server are owned by nobody:nogroup
.
Well, I thought this was no problem, I just had to use chown
. But sudo chown -R $USER:$USER <directory>
just gives operation not permitted
. This is already weird, but I logged in as root using sudo -i
and tried to chang the ownership and the result was the same.
I googled the problem and people were talking about the directory being immutable. But lsattr -d <directory>
returns ------------------
which means the directory is not immutable. But looking at ls -ld <directory>
shows that only the owner(nobody:nogroup
) has write access. So I try sudo chmod -R 666 <directory>
but I get operation not permitted
again.
At this point I just wanted to get it over with, so I edited /etc/passwd
so that I can login using nobody
. But even as nobody
I got operation not permitted
.
So now I have this huge space taken by these files that I can't delete but I also can't use in production.
Any suggestions? thanks