Bug 126664 - Permissions and the trash
Summary: Permissions and the trash
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: nautilus
Version: 2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Alexander Larsson
QA Contact:
URL:
Whiteboard:
: 127674 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-06-24 14:54 UTC by Kyrre Ness Sjøbæk
Modified: 2007-11-30 22:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-22 13:11:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Kyrre Ness Sjøbæk 2004-06-24 14:54:00 UTC
Description of problem:
I have several times noticed, that if i "throw" files for which i have
no writing access to (although i own them), i get an error message
stating that cannot be deleted. The only way i am able to delete them
is doing a "chmod -R 700 *" in "~/.trash". Then i can empty the trash.

Version-Release number of selected component (if applicable):


How reproducible:
every time, i think

Steps to Reproduce:
1.Delete some file you own, but have no writing access to
2.Try to empty the trash
3.Error message
4.chmod the stuff
5.Now the stuff is deletable
  
Actual results:
deletion halts.

Expected results:
It should be automagicaly chmod'ed before deletion, in this way
avoiding the problem.

Additional info:

Comment 1 Alexander Larsson 2004-08-26 13:40:51 UTC
*** Bug 127674 has been marked as a duplicate of this bug. ***

Comment 2 Matthew Miller 2005-04-26 15:54:54 UTC
Fedora Core 2 is now maintained by the Fedora Legacy project for
security updates only. If this problem is a security issue, please
reopen and reassign to the Fedora Legacy product. If it is not a
security issue and hasn't been resolved in the current FC3 updates or
in the FC4 test release, reopen and change the version to match.

Comment 3 Marius Andreiana 2005-08-19 19:16:11 UTC
I cannot replicate this in FC4. But I'm able to delete filed without +w
permission (just unable to modify them). If the files are in a directory without
+w, then they cannot be deleted or moved to trash (nautilus handles it properly).

Would somebody confirm please?

Comment 4 Kyrre Ness Sjøbæk 2005-08-25 19:45:28 UTC
Hmm... I can at least reproduce one problem where the trash cannot be emptied:
1. Unzip a zip file as a user (such as with file-roller) to your home directory,
creating ~/adm8211
2. (as root) cd ~kyrre/adm8211
3. (as root) make (or make install - but it doesnt matter in order to reproduce
it. yes im am lacy. No it hasn't bitten me yet. No this computer doesn't contain
any valuable data.
4. (as user) delete (to trash) the folder ~/adm8211 in nautilus, by pushing the
delete key
5. empty the trash. Error message "...cannot delete because rigths to parent
folder lacking" (freely translated from norwegian.
6. push "skip" three times
7. Some interesting info:
[kyrre@testpc .Trash]$ ls -laR
.:
totalt 20
drwx------   3 kyrre kyrre 4096 aug 25 21:38 .
drwxr-xr-x  43 kyrre kyrre 4096 aug 25 21:38 ..
drwxrwxr-x   3 kyrre kyrre 4096 aug 25 21:39 adm8211

./adm8211:
totalt 16
drwxrwxr-x  3 kyrre kyrre 4096 aug 25 21:39 .
drwx------  3 kyrre kyrre 4096 aug 25 21:38 ..
drwxr-xr-x  2 root  root  4096 aug 25 21:37 .tmp_versions

./adm8211/.tmp_versions:
totalt 12
drwxr-xr-x  2 root  root  4096 aug 25 21:37 .
drwxrwxr-x  3 kyrre kyrre 4096 aug 25 21:39 ..
-rw-r--r--  1 root  root   158 aug 25 21:37 adm8211.mod
[kyrre@testpc .Trash]$
8. Navigate to ~user/.Trash as root and kill it with rm -rf

Well.. This shouldn't happen anyway, as i ain't supposed to have root's files in
my homedir :)

But a warning when i move them to trash from nautilus would be nice.

Comment 5 Matthew Miller 2006-07-07 17:30:20 UTC
Is this still a problem in current releases? If it is, please change the version
number to match the version you tested on. Thanks.

Comment 6 Kyrre Ness Sjøbæk 2006-08-17 12:48:37 UTC
Lets do a test:
[kyrre@storeulv ~]$ su -
Passord:
[root@storeulv ~]# cd /home/kyrre/
[root@storeulv kyrre]# touch evilfile
[root@storeulv kyrre]# ls -l evilfile
-rw-r--r-- 1 root root 0 aug 17 14:54 evilfile
[root@storeulv kyrre]#

Ok, then we have a really evil file. Then we enter nautilus (as the user kyrre),
and delete this file. No problem. Just select it and hit delete. (it had the "no
writing" symbol, but hey - i'm allowed to move stuff around).

I then empty the trash. It did actually vanish! As it did when i tried to delete
it with rm.

Strange - i didn't think i was allowed to do such things (as an ordinary user).
What changed? But, well. It worked.

Version:
nautilus-2.14.1-1.fc5.1

I think we can close this one. But how was i able to kill that file?!?


Note You need to log in before you can comment on or make changes to this bug.