corruption of write-protected files when changing permissions or deleting

Bug #20933 reported by Lesmond74
10
Affects Status Importance Assigned to Milestone
nautilus (Ubuntu)
Invalid
Medium
Ubuntu Desktop Bugs

Bug Description

For example, as user I use the rm -R command to delete a directory which
contains some write-protected codec files residing on a flash drive. The
terminal asks me to confirm this action for each write-protected file. But
instead of doing what I wanted the directory is turned into a corrupted,
unreadable one. As root, I am able to remove the directory but to my horror I
find that the entire contents of the flash drive are deleted with it!

Needless to say, this is very annoying. And it is the more so because this kind
of thing has happened to me a number of times before. Another example is doing a
recursive change of permissions on a directory which contains write-protected
mp3 files. The entire directory becomes corrupted and unreadable.

This kind of corruption has happened regardless of the filesystem used - the
flash drive is vfat, my home partition has been both ext3 and reiserfs, and my
shared hard drive is vfat.

I'm no expert but my guess is that it is a problem with nautilus, possibly
related to the bug filed earlier about crashes when trying to access the
'Properties' of audio files. Whatever it is, I think I'm going to have to look
into using another file manager.

Thanks for your time.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug. Do you have some simple steps to do giving a such issue?
I'm not sure to understand what you do exactly to get the corruption. What
version of Ubuntu do you use? Do you use nautilus only when getting the issue?

Revision history for this message
Lesmond74 (lesmond74) wrote :

In reply to your email - "Thanks for your bug. Do you have some simple steps to
do giving a such issue?
I'm not sure to understand what you do exactly to get the corruption. What
version of Ubuntu do you use? Do you use nautilus only when getting the issue?"

I'm not using Ubuntu anymore (switched to Debian Testing recently) but the
problem I described occurred in Ubuntu Hoary and, as far as I can remember, only
with the Nautilus file manager. Try doing these steps -

1. Copy a directory containing, say, 50 audio files from CD/DVD to your hard
drive. Because they came from a write-protected medium (CD/DVD) they should all
be write-protected on your hard drive (in other words, all '555' I think). If
you look at them in Nautilus there should be a lock or other symbol (depending
on your icon theme) on top of the folder and each file to indicate this.

2. Now try doing 'chmod 644 -R ' on this directory to make it writable for you
as user/owner of these files.

3. Watch the terminal output - there will likely be a whole bunch of errors
relating to permissions listed.

4. Now go into your directory using Nautilus. Instead of the speaker icon for
each of the files you should see the gnome foot icon, indicating an unspecified
file type. This is because the directory and all that it contains became
corrupted in the 'chmod' operation. You will not be able to do anything with
this directory other than delete it using 'sudo rm -R'.

Of course, this problem may not be specific to Nautilus. I just guessed it might
be because Nautilus is the default/only file manager used in Ubuntu. Either way,
a whole directory shouldn't be destroyed by such a simple and standard Linux
operation as changing permissions.

I hope this further info helps you along. Unfortunately I won't be able to
provide anything else since I'm using Debian now (with a lightweight setup based
around xfce4 and which doesn't use Nautilus).

THanks again.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Which partition types did you save to? What permissions did you have on them?

Revision history for this message
Lesmond74 (lesmond74) wrote :

(In reply to comment #3)
> Which partition types did you save to? What permissions did you have on them?

This happened on partitions formatted with both ext3 and reiserfs. As far as
permissions are concerned, it was my /home directory, which is usually its own
partition, but in the past was part of the root directory. But the problem
occurs in both these situations.

For what it's worth, I'm getting the same problem in Debian, in the xfce4
desktop environment. It only seems to be happening to media-related files -
audio, video, images of any file type. If I run, for example, 'chmod 644 -R
<directory name>' on a directory full of text files, the operation is performed
successfully. Exactly this used to happen in Ubuntu. On media files, the
terminal will report 'Access Denied' and then if you look in the file manager
you will see that the files have become corrupted, like I wrote above.

The only way to perform the operation successfully is if it's done from within
the directory you want to change, eg. 'chmod 644 *'. This of course assumes that
the directory is writeable in the first place. If it isn't, you have to copy all
the files to somewhere that is.

Actually, I don't think this is a file manager problem anymore. I think it's a
Linux problem. The reason I thought Nautilus may have had something to do with
it is that I used to try and perform chmod-type operations from within the
graphical environment.

But if I am wrong and it turns out that what I am doing is just the incorrect
way of doing chmod, just let me know. I'm not exactly a Linux expert :)

Revision history for this message
Sebastien Bacher (seb128) wrote :

Do you still have the issue with dapper?

Changed in nautilus:
assignee: seb128 → desktop-bugs
Revision history for this message
Rich Johnson (nixternal) wrote :

Your bug lacks information we would need to investigate further. We
are now going to close the bug - please reopen if you have more
information at hand.

Changed in nautilus:
status: Needs Info → Rejected
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.