some chmod questions...
Ok, I am working on using the chmod and chown commands. Here's what I have now. I have some files in my root directory that I copied over to my other username's directory. While doing this, all permissions stayed the same obviously. I was able to chown of the main directory but the subdirectories have the same permissions as before (from where they were from root)...and that's A LOT of subdirectories and files. Is there any quick way I can change permissions to all these at once rather than each folder/file separately.
|
chown -R
BE CAREFUL WITH THIS... you can screw things up. Make sure you are changing the directory you want. You should be careful with any command that recurses down the tree. |
chown -R
man chown |
Re: some chmod questions...
Quote:
This command will change ownership of /path/to/directory and any file/directory downward to user user. Further RTFM: the chown man page |
k, thanks....and yeah I am being careful. I only copied everything from my root directory over, so the original files will still be in the right place. Most of the copies will get deleted (noticed a lot of ./ type of directories), but I just wanna get a few files from here. Still, it's given me a chance to screw around with command line which was my reason.
|
You'll note that most people tend to be very careful when advising others to use recursive commands. Even where the risks are light...
For example, if you accidentally chown -R 'ed someone's home directory... you could easily fix it by repeating the command with their name. But if you chown -R 'd /usr/bin ... that would ruin tons of stuff. I recommend the "Unix Horror Stories" as required reading for anyone who is going to spend any amount of time as root on a *nix box. Lot's of examples of what NOT to do. |
All times are GMT -5. The time now is 06:07 PM. |