Changing Ownership: "Operation not permitted" - even as root!
I am trying to help a user solve an issue with a bootable USB drive, but there seems to be a file whose ownership cannot be edited. I thought it would have been possible with:
sudo chown user:user ldlinux.sys
When that is executed, however, terminal gives this error:
Operation not permitted
The extended chat I had with the user can be found here.
Top Answer/Comment:
The file might have the immutable flag (i) set in its extended attributes:
% stat -c '%04a %U %G' ldlinux.sys
0644 root root
% lsattr ldlinux.sys
----i----------------- ldlinux.sys
% sudo chown dev: ldlinux.sys
chown: changing ownership of 'ldlinux.sys': Operation not permitted
If that's the case, run:
sudo chattr -i ldlinux.sys
% sudo chattr -i ldlinux.sys
% lsattr ldlinux.sys
---------------------- ldlinux.sys
% sudo chown dev: ldlinux.sys
%
상단 광고의 [X] 버튼을 누르면 내용이 보입니다