CHMOD directories.sub-directories.files
I recently migrated a bunch of files from a windows partition to a linux partition; these all became ownership of root, allowing no other users to access to the files. Is there a way to CHMOD these directories, sub-directories, and files without having to go through every single folder and file? I'm looking at at least 500 folders with 10,000 files... surely there must be a more efficient way of doing this.
Does anyone know how? All the references I have read explain CHMOD only by giving examples with individual files. Thanks! |
Here is three programs you can use:
Chmod # Changes file/folder permissions (as you already seem to know) chown # Changes file/folder user ownership chgrp # Changes file/folder group ownership All three of these programs can use "-R" to change fils/folders recursively. Use "-f" to just do it without prompting or error warning. So, to enable write permissions to a directory and everything below it, use: chmod -Rf +w <dir> To Change ownership: chown -Rf <user> <directory And to change group: chgrp -Rf <group> <dir> Hope this helps. |
Thanks!
Thank you so much, it worked on everything I had in only a few seconds.
Thanks again! |
All times are GMT -5. The time now is 11:17 PM. |