I can't change the owner of a file (I'm logged in as root).
Output of chown root Shrek.avi
:
chown: changing ownership of 'Shrek.avi': Operation not permitted
Output of chattr -i Shrek.avi
:
chattr: Permission denied while reading flags on Shrek.avi
Output of strace chattr -i Shrek.avi
:
execve("/usr/bin/chattr", ["chattr", "-i", "Shrek.avi"], 0x7ffd5a2a56f0 /* 24 vars */) = 0
brk(NULL) = 0x55a268bd4000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=32282, ...}) = 0
mmap(NULL, 32282, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd25ebeb000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libe2p.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p3\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=44976, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd25ebe9000
mmap(NULL, 47680, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fd25ebdd000
mprotect(0x7fd25ebe0000, 28672, PROT_NONE) = 0
mmap(0x7fd25ebe0000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7fd25ebe0000
mmap(0x7fd25ebe4000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7fd25ebe4000
mmap(0x7fd25ebe7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x7fd25ebe7000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libcom_err.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\"\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=18344, ...}) = 0
mmap(NULL, 20648, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fd25ebd7000
mmap(0x7fd25ebd9000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fd25ebd9000
mmap(0x7fd25ebda000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7fd25ebda000
mmap(0x7fd25ebdb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7fd25ebdb000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 l\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=149520, ...}) = 0
mmap(NULL, 136304, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fd25ebb5000
mmap(0x7fd25ebbb000, 65536, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7fd25ebbb000
mmap(0x7fd25ebcb000, 24576, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7fd25ebcb000
mmap(0x7fd25ebd1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b000) = 0x7fd25ebd1000
mmap(0x7fd25ebd3000, 13424, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fd25ebd3000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@>\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1905632, ...}) = 0
mmap(NULL, 1918592, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fd25e9e0000
mmap(0x7fd25ea02000, 1417216, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x22000) = 0x7fd25ea02000
mmap(0x7fd25eb5c000, 323584, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17c000) = 0x7fd25eb5c000
mmap(0x7fd25ebab000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ca000) = 0x7fd25ebab000
mmap(0x7fd25ebb1000, 13952, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fd25ebb1000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd25e9de000
arch_prctl(ARCH_SET_FS, 0x7fd25e9deb80) = 0
mprotect(0x7fd25ebab000, 16384, PROT_READ) = 0
mprotect(0x7fd25ebd1000, 4096, PROT_READ) = 0
mprotect(0x7fd25ebdb000, 4096, PROT_READ) = 0
mprotect(0x7fd25ebe7000, 4096, PROT_READ) = 0
mprotect(0x55a266c1c000, 4096, PROT_READ) = 0
mprotect(0x7fd25ec1d000, 4096, PROT_READ) = 0
munmap(0x7fd25ebeb000, 32282) = 0
set_tid_address(0x7fd25e9dee50) = 1259
set_robust_list(0x7fd25e9dee60, 24) = 0
rt_sigaction(SIGRTMIN, {sa_handler=0x7fd25ebbb690, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7fd25ebc8140}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {sa_handler=0x7fd25ebbb730, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7fd25ebc8140}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
brk(NULL) = 0x55a268bd4000
brk(0x55a268bf5000) = 0x55a268bf5000
lstat("Shrek.avi", {st_mode=S_IFREG|0400, st_size=2302464000, ...}) = 0
openat(AT_FDCWD, "Shrek.avi", O_RDONLY|O_NONBLOCK|O_NOFOLLOW) = -1 EACCES (Permission denied)
write(2, "chattr", 6chattr) = 6
write(2, ": ", 2: ) = 2
write(2, "Permission denied", 17Permission denied) = 17
write(2, " ", 1 ) = 1
write(2, "while reading flags on Shrek.avi", 32while reading flags on Shrek.avi) = 32
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(2, "\n", 1
) = 1
exit_group(1) = ?
+++ exited with 1 +++
I'm running Turnkey Core 17.1 as an LXC container in Proxmox.
The filesystem is ext4.
I've been trying to fix this for 2 days. Can somebody help, please?