Help - Search - Members - Calendar
Full Version: Could somebody please clue me in on permissions?
MandrivaUsers.org > Advanced Topics > Other Linux and Unix Distributions
klinger2004
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
romulf
tou can try this:
chmod -R 777 *
from your trash directory
klinger2004
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
Qchem
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??
klinger2004
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!
Qchem
change to the .Trash directory, then as root

rm -rf *

should clear the lot out!
klinger2004
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 cry.gif - 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
Qchem
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
sarah31
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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.