You are not logged in.

#1 2009-04-01 14:06:30

FrankTM
Member
From: Zwolle, Netherlands
Registered: 2006-02-19
Posts: 26

Filesystem issues while updating

I can't upgrade community repository because some file on my harddisk does not like to be removed.

[root@senna frank]# pacman -Sy
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community                366.9K 1084.6K/s 00:00:00 [###########################################################################] 100%
error: could not remove database entry communitygnomebaker
error: failed to update community (could not remove database entry)
 testing is up to date

When I manually try to remove this file:

[root@senna gnomebaker-0.6.2-1]# pwd
/var/lib/pacman/sync/community/gnomebaker-0.6.2-1
[root@senna gnomebaker-0.6.2-1]# ls
depends
[root@senna gnomebaker-0.6.2-1]# rm -vRf depends 
rm: cannot remove `depends': Operation not permitted

Strace:

[root@senna gnomebaker-0.6.2-1]# strace rm -vRf depends 
execve("/bin/rm", ["rm", "-vRf", "depends"], [/* 35 vars */]) = 0
brk(0)                                  = 0x8c11000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=53084, ...}) = 0
mmap2(NULL, 53084, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7eea000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 h\1\0004\0\0\0\200"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1554407, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ee9000
mmap2(NULL, 1336912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7da2000
mprotect(0xb7ee2000, 4096, PROT_NONE)   = 0
mmap2(0xb7ee3000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x140) = 0xb7ee3000
mmap2(0xb7ee6000, 9808, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7ee6000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7da1000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7da16c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7ee3000, 8192, PROT_READ)   = 0
mprotect(0xb7f14000, 4096, PROT_READ)   = 0
munmap(0xb7eea000, 53084)               = 0
brk(0)                                  = 0x8c11000
brk(0x8c32000)                          = 0x8c32000
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
lstat64("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("depends", {st_mode=S_IFREG|0644, st_size=115, ...}) = 0
unlink("depends")                       = -1 EPERM (Operation not permitted)
write(2, "rm: "..., 4rm: )                  = 4
write(2, "cannot remove `depends'"..., 23cannot remove `depends') = 23
write(2, ": Operation not permitted"..., 25: Operation not permitted) = 25
write(2, "\n"..., 1
)                    = 1
close(0)                                = 0
close(1)                                = 0
close(2)                                = 0
exit_group(1)                           = ?

Does anyone have a clue what I can do about this?
It's been a while since I updated community now tongue


Here is your parachute and here is the manual. Welcome to Linux.

Offline

#2 2009-04-02 07:52:27

grndrush
Member
From: Hamilton, Ontario, Canada
Registered: 2003-12-28
Posts: 136
Website

Re: Filesystem issues while updating

Here is your parachute and here is the manual. Welcome to Linux.

+1.  LMAO.

Offline

#3 2009-04-13 09:48:35

FrankTM
Member
From: Zwolle, Netherlands
Registered: 2006-02-19
Posts: 26

Re: Filesystem issues while updating

bump. anyone? smile


Here is your parachute and here is the manual. Welcome to Linux.

Offline

#4 2009-04-13 13:41:32

lucasdemarchi
Member
From: Brazil
Registered: 2009-03-26
Posts: 34
Website

Re: Filesystem issues while updating

I believe it's related to this file's attributes. Issue "lsattr" in  this file and see if there's an "i" attribute. If so, change it:
chattr -i filename

From chattr's man page:

A file with the `i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file
       and no data can be written to the file.  Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability
       can set or clear this attribute.

regards

Offline

#5 2009-04-13 17:13:36

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: Filesystem issues while updating

Also 'ls -l depends' and looking at the permissions might shed some light on this.

Offline

#6 2009-04-16 08:31:08

FrankTM
Member
From: Zwolle, Netherlands
Registered: 2006-02-19
Posts: 26

Re: Filesystem issues while updating

lucasdemarchi wrote:

I believe it's related to this file's attributes. Issue "lsattr" in  this file and see if there's an "i" attribute. If so, change it:
chattr -i filename

From chattr's man page:

A file with the `i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file
       and no data can be written to the file.  Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability
       can set or clear this attribute.

regards

You are my hero smile
Worked like a charm.

Now I can update community again smile


Here is your parachute and here is the manual. Welcome to Linux.

Offline

Board footer

Powered by FluxBB