How to Empty Trash if files in there are owned by Root?
CLIFFORD ILKAY
clifford_ilkay at dinamis.com
Thu Oct 16 22:06:27 UTC 2008
Ulin the Tech Mage wrote:
> Kipton Moravec wrote:
>> I was running out of disk space and discovered I had a bunch of files in
>> Trash.
>>
>> So I tried to empty trash and found there were a number of files in
>> there that were owned by root, because of a screw-up I did when I
>> installed a program a while back.
>>
>> There are other files that are owned by me that will not delete because
>> they have the wrong permissions, but it will not let me change the
>> permissions.
>>
>> >From the GUI I do not know how to remove them.
>>
>> I did a search on the name to see if I could find the path to the Trash
>> directory and these files did not show up.
>>
>> What do I do?
>>
>>
>>
> open a terminal
> run the following commands:
> cd ~.trash
> sudo chmod -R 777 *
> rm -rf *
> exit
That is not good advice. That will enable every user to see the files of
in the trash. A better but a bit dangerous way is to:
sudo rm -rf /path/to/trash/*
Be very, very careful about using rm -rf! One finger fumble, for example
a space after any of the slashes above, and you'll destroy your system.
A better and less dangerous way is:
sudo chown -R cilkay:cilkay /path/to/trash
Then, you should be able to empty trash using your GUI or as cilkay doing:
rm -rf ~/path/to/trash
Why is that less dangerous? Because cilkay normally cannot delete files
outside of his own home directory so worst case scenario, he'll be able
to destroy his own files but he won't be able to destroy the whole
system. Obviously, you need to substitute your user and group name for
cilkay.
--
Regards,
Clifford Ilkay
Dinamis
1419-3266 Yonge St.
Toronto, ON
Canada M4N 3P6
<http://dinamis.com>
+1 416-410-3326
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3273 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20081016/c7effce8/attachment.bin>
More information about the ubuntu-users
mailing list