Skip to contentSkip to conversation

Permission denied on access to files; even as root

DISCUSSION Chris Worley 3 participants 10 messages Jun 16, 2002 – Jun 18, 2002

lore
Share & tools
lore
#0 lore raw

I've got a couple hundred files that seem to be in a bad state since I tried (unsuccessfully) converting my file system, for example (as root):

/usr/bin # ls -l gdb
ls: gdb: Permission denied
/usr/bin # mv gdb gdb.bak
mv: cannot stat `gdb': Permission denied /usr/bin # chmod a+r gdb
chmod: getting attributes of `gdb': Permission denied

Any idea what has happened and how to recover these files?

Thanks,

Chris

#1 lore raw
Quoted 12 lines · Chris Worley

I've got a couple hundred files that seem to be in a bad state since I tried (unsuccessfully) converting my file system, for example (as root):

/usr/bin # ls -l gdb
ls: gdb: Permission denied
/usr/bin # mv gdb gdb.bak
mv: cannot stat `gdb': Permission denied /usr/bin # chmod a+r gdb
chmod: getting attributes of `gdb': Permission denied

Any idea what has happened and how to recover these files?

It means that your filesystem is corrupted. Probably statdata item of gdb. Have you tried to fsck it? What did fsck say?

Quoted 9 lines

Thanks,

Chris

#2 lore raw

Lots of lines like:

bad_stat_data: 4377 is shared by at least two files

and:

shrink_id_map: objectid map shrinked: used 4096, 5 blocks

A few:

bad_stat_data: 960450 is marked free, but used by an object 37421 960450 0x0 SD

and:

grow_id_map: objectid map expanded: used 10240, 10 blocks

It's not finished yet. It's the root partition so it's doing it in read-only mode.

I'm Running Linux 2.4.10-4GB on SuSE 7.3 with reiserfsprogs-3.x.0j-1 (using 3.5.x disk format...ReiserFS version 3.6.25) atop lvm-1.0.0.2_rc2-6. I upgraded reiserfs after a disk crash last xmas (with a few remnants of that catastrophe still in the system).

I was trying to convert the file system for large files last week, and wound up deciding that my reiser tools and the kernel patch are not in sync.

The problem is progressive. I.e. "/bin/hostname" can't be executed today, and it was fine after trying the "conv".

Chris

Quoted 29 lines · Yury Umanets
Quoted 12 lines · Chris Worley

I've got a couple hundred files that seem to be in a bad state since I tried (unsuccessfully) converting my file system, for example (as root):

/usr/bin # ls -l gdb
ls: gdb: Permission denied
/usr/bin # mv gdb gdb.bak
mv: cannot stat `gdb': Permission denied /usr/bin # chmod a+r gdb
chmod: getting attributes of `gdb': Permission denied

Any idea what has happened and how to recover these files?

It means that your filesystem is corrupted. Probably statdata item of gdb. Have you tried to fsck it? What did fsck say?

Quoted 9 lines

Thanks,

Chris

#3 lore raw
Quoted 13 lines · Chris Worley

Lots of lines like:

bad_stat_data: 4377 is shared by at least two files

and:

shrink_id_map: objectid map shrinked: used 4096, 5 blocks

A few:

bad_stat_data: 960450 is marked free, but used by an object 37421 960450 0x0 SD

Quoted 7 lines

and:

grow_id_map: objectid map expanded: used 10240, 10 blocks

It's not finished yet. It's the root partition so it's doing it in read-only mode.

This trouble was caused by objectid map fragmentation activity.

Quoted 6 lines

I'm Running Linux 2.4.10-4GB on SuSE 7.3 with reiserfsprogs-3.x.0j-1 (using 3.5.x disk format...ReiserFS version 3.6.25) atop lvm-1.0.0.2_rc2-6. I upgraded reiserfs after a disk crash last xmas (with a few remnants of that catastrophe still in the system).

Old one. I very recommend you to use last pre4 reiserfsprogs instead your current version. Also it is highly recommened to run at least 2.4.18 kernel or even higher (I'm running 2.4.19-pre10). They are free of a lot of bugs.

Quoted 5 lines

I was trying to convert the file system for large files last week, and wound up deciding that my reiser tools and the kernel patch are not in sync.

:)) See above.

Quoted 52 lines

The problem is progressive. I.e. "/bin/hostname" can't be executed today, and it was fine after trying the "conv".

Chris

Quoted 35 lines · Yury Umanets
Quoted 14 lines · Chris Worley

I've got a couple hundred files that seem to be in a bad state since I tried (unsuccessfully) converting my file system, for example (as root):

/usr/bin # ls -l gdb
ls: gdb: Permission denied
/usr/bin # mv gdb gdb.bak
mv: cannot stat `gdb': Permission denied /usr/bin # chmod a+r gdb
chmod: getting attributes of `gdb': Permission denied

Any idea what has happened and how to recover these files?

It means that your filesystem is corrupted. Probably statdata item of gdb. Have you tried to fsck it? What did fsck say?

Quoted 10 lines

Thanks,

Chris

#4 lore raw
In reply to Chris Worley

Hello!

Quoted 1 line · Chris Worley

I'm Running Linux 2.4.10-4GB on SuSE 7.3 with reiserfsprogs-3.x.0j-1

Consider upgrading your server otherwise problem will repeat itself. SuSE update kernel 2.4.16 would be fine for you.

Quoted 2 lines

The problem is progressive. I.e. "/bin/hostname" can't be executed today, and it was fine after trying the "conv".

Yes, newly created files occupy OIDs of already existing ones.

Upgrade kernel and fsck, then run reiserfsck and it will fix the problems. 3.x.1b version of reiserfsprogs would be fine for you.

Bye,
Oleg

#5 lore raw

So, If I:

1) compile and install (configured as my previous kernel) the kernel kernel-source-2.4.16.SuSE-32.i386.rpm at ftp.suse.com in /pub/suse/i386/update/7.3/2.4.16-20020416 and

2) configure/make/install reiserfsprogs-3.x.1b, and

3) remake my lvm initrd, then

4) reboot single user and run reiserfsck (no args),

I'll have a working, fixed file system that will have large file capabilities?

Thanks,

Chris

Quoted 21 lines · Oleg Drokin

Hello!

Quoted 1 line · Chris Worley

I'm Running Linux 2.4.10-4GB on SuSE 7.3 with reiserfsprogs-3.x.0j-1

Consider upgrading your server otherwise problem will repeat itself. SuSE update kernel 2.4.16 would be fine for you.

Quoted 2 lines

The problem is progressive. I.e. "/bin/hostname" can't be executed today, and it was fine after trying the "conv".

Yes, newly created files occupy OIDs of already existing ones.

Upgrade kernel and fsck, then run reiserfsck and it will fix the problems. 3.x.1b version of reiserfsprogs would be fine for you.

Bye,
Oleg

#6 lore raw

I'm loosing files faster than I can compile.

Just give me a hint: if I can install/compile/lilo SuSE's kernel-source-2.4.16.SuSE-32.i386.rpm and the listed reiserfs tools, will my file system be repairable? Most of /lib /usr/lib /usr/*bin and /*bin have become unusable.

Thanks,

Chris

Quoted 43 lines · Chris Worley

So, If I:

1) compile and install (configured as my previous kernel) the kernel kernel-source-2.4.16.SuSE-32.i386.rpm at ftp.suse.com in /pub/suse/i386/update/7.3/2.4.16-20020416 and

2) configure/make/install reiserfsprogs-3.x.1b, and

3) remake my lvm initrd, then

4) reboot single user and run reiserfsck (no args),

I'll have a working, fixed file system that will have large file capabilities?

Thanks,

Chris

Quoted 21 lines · Oleg Drokin

Hello!

Quoted 1 line · Chris Worley

I'm Running Linux 2.4.10-4GB on SuSE 7.3 with reiserfsprogs-3.x.0j-1

Consider upgrading your server otherwise problem will repeat itself. SuSE update kernel 2.4.16 would be fine for you.

Quoted 2 lines

The problem is progressive. I.e. "/bin/hostname" can't be executed today, and it was fine after trying the "conv".

Yes, newly created files occupy OIDs of already existing ones.

Upgrade kernel and fsck, then run reiserfsck and it will fix the problems. 3.x.1b version of reiserfsprogs would be fine for you.

Bye,
Oleg

#7 lore raw

Hello!

Quoted 4 lines · Chris Worley

Just give me a hint: if I can install/compile/lilo SuSE's kernel-source-2.4.16.SuSE-32.i386.rpm and the listed reiserfs tools, will my file system be repairable? Most of /lib /usr/lib /usr/*bin and /*bin have become unusable.

Yes, usually reiserfsck fixes such a problem without any troubles and all the files are accessible again.

You may even not compile SuSE kernel, but take precompiled one (and the tools too) from updates. Though I do not know if they have LVM support suitable for you.

Bye,
Oleg

#8 lore raw

Long day. Tried booting into single user mode, and running reiserfsck with --fix-fixable, it would say it was running in "fixable" mode, but end saying there were 30000+ files that could be fixed w/ "--fix-fixable"; repeated many times, but the files permissions would not cooperate. I finally did a "--rebuild-tree"... there's a few hundred files in lost+found (much less than the last time I had to rebuild the tree), The reiserfs loadable module has debugging turned on, which might help if there are any problems remaining.

Anyway, the system is up and stable again. I can create large files too.

Thanks to all that helped!

Chris

Quoted 19 lines · Oleg Drokin

Hello!

Quoted 4 lines · Chris Worley

Just give me a hint: if I can install/compile/lilo SuSE's kernel-source-2.4.16.SuSE-32.i386.rpm and the listed reiserfs tools, will my file system be repairable? Most of /lib /usr/lib /usr/*bin and /*bin have become unusable.

Yes, usually reiserfsck fixes such a problem without any troubles and all the files are accessible again.

You may even not compile SuSE kernel, but take precompiled one (and the tools too) from updates. Though I do not know if they have LVM support suitable for you.

Bye,
Oleg

#9 lore raw
In reply to Chris Worley

Hello!

Quoted 8 lines · Chris Worley

1) compile and install (configured as my previous kernel) the kernel kernel-source-2.4.16.SuSE-32.i386.rpm at ftp.suse.com in /pub/suse/i386/update/7.3/2.4.16-20020416 and
2) configure/make/install reiserfsprogs-3.x.1b, and
3) remake my lvm initrd, then
4) reboot single user and run reiserfsck (no args),
I'll have a working, fixed file system that will have large file capabilities?

No.
You must boot-off some rescue media.
Because root fs is mounted even in single user mode.

Bye,
Oleg