Guest klinger2004 Posted October 20, 2003 Report Share Posted October 20, 2003 I am trying to empty my trash - these were files that were copied from a cd. Since I am the only person that uses my pc, I ran a chmod 777 * command because by default these files were not writable. The chmod command works fine - but not on subdirectories and sub-files. Is there a "god mode" for this kind of thing? My trash bin will not empty because some files are protected and i don't have the energy to chmod about one hundred different directories so that I can delete the stuff. Thanks in advance! Eric Quote Link to comment Share on other sites More sharing options...
romulf Posted October 20, 2003 Report Share Posted October 20, 2003 tou can try this: chmod -R 777 * from your trash directory Quote Link to comment Share on other sites More sharing options...
Guest klinger2004 Posted October 20, 2003 Report Share Posted October 20, 2003 Great! That was it - thanks very much. Will this work for all directories? I'll be sure to check for a chmod --help page! Thanks again! Eric Quote Link to comment Share on other sites More sharing options...
Qchem Posted October 20, 2003 Report Share Posted October 20, 2003 Eric, the standard help page is man, so: man chmod would give you lots of info on chmod (recursive being the key here for chmod -R), or indeed chmod --help from the command line. Incidently, can't you just delete all the files as root?? Quote Link to comment Share on other sites More sharing options...
Guest klinger2004 Posted October 20, 2003 Report Share Posted October 20, 2003 hmmmm... not exactly sure. I did a ls -l and it showed "eric" as the owner of all the files. I didn't try it. Would I do a rmdir from my .Trash directory ... a rmdir * perhaps? Thanks for the input! Quote Link to comment Share on other sites More sharing options...
Qchem Posted October 20, 2003 Report Share Posted October 20, 2003 change to the .Trash directory, then as root rm -rf * should clear the lot out! Quote Link to comment Share on other sites More sharing options...
Guest klinger2004 Posted October 20, 2003 Report Share Posted October 20, 2003 Now it may seem that I fouled things up a bit... I believe that I have typed chmod -R 777 * at the / directory (which I intended to at .Trash). I am ASSuming that this is not good because when I log out from init5 to init3 I get an error "permissions error in pam_timestamp_check" and a couple about a floppy "leak". I tried to save the errors but wasn't successful - in init3 I selected all of the text - typed "touch errors.txt", then "vi errors.txt", hit insert and hit my 3rd mouse btn to paste - but for one reason or another - it didn't work, I will try again to recreate the errors...... Please don't flame me for this - but is there now a way to set my permissions back to their default setting? Thanks Eric Quote Link to comment Share on other sites More sharing options...
Qchem Posted October 20, 2003 Report Share Posted October 20, 2003 I don't know how you can easily revert this - at least it wasn't rm -rf /* - that would be very bad. the perms on pam_timestamp_check should be -r-s--x--x if thats any help Quote Link to comment Share on other sites More sharing options...
sarah31 Posted October 20, 2003 Report Share Posted October 20, 2003 it will be very hard to recover from this as there will have been several settings for all the different types of files. 644, 755, etc. in future always make sure you throw in an i in rm -rf * (rm -rfi *) this way you should recognize that you have screwed up. as for getting rid of files that have root only grouping or permissions that is what sudo and su are for. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.