![]() |
|
|
#1 |
|
"Jason Goatcher"
Mar 2005
3·7·167 Posts |
At first the title was 'I want to change every file and dir to chmod 770.' Then, I realized that might not be such a good idea.
So, assuming x means that number stays what it is, is there an easy way to change everything on my Linux box to 'chmod xx0'? |
|
|
|
|
|
#2 |
|
Jan 2006
JHB, South Africa
157 Posts |
Hi Jasong,
The option you are looking for is -R. chmod -R xx0 * x is as you defined it. This would change all files, sub-directories & files within the current sub-directory. Regards Patrick Last fiddled with by Patrick123 on 2007-09-04 at 15:32 |
|
|
|
|
|
#3 |
|
"Mike"
Aug 2002
25·257 Posts |
Use with caution!
|
|
|
|
|
|
#4 |
|
Mar 2005
Internet; Ukraine, Kiev
11×37 Posts |
You might also want to do a chmod -R +X directory if you want your directories to have execute permission, so you can chdir() into them.
|
|
|
|
|
|
#5 |
|
"Patrik Johansson"
Aug 2002
Uppsala, Sweden
1101010012 Posts |
I think you want
chmod -R o= . (or chmod -R o-rwx . if the chmod doesn't support = ; SunOS doesn't IIRC) This changes the current dir and its sub-dirs. Using * will miss files starting with a dot and the current directory. |
|
|
|
|
|
#6 |
|
Jan 2006
JHB, South Africa
157 Posts |
I agree, This can lock you out of your system completely, or.. open it up for any Tom, Dick, or Harry.
SCO Unix, has the fixmog and integrity commands to ensure correct & safe permissions. Is there anything similar in Linux? Regards Patrick Last fiddled with by Patrick123 on 2007-09-05 at 13:12 |
|
|
|
|
|
#7 |
|
"Jason Goatcher"
Mar 2005
350710 Posts |
Code:
chmod -R o=-r-w-x * |
|
|
|
|
|
#8 | |
|
"Mike"
Aug 2002
25×257 Posts |
Quote:
http://en.wikipedia.org/wiki/Wildcar...cter#Computing |
|
|
|
|
|
|
#9 | |
|
"Mike"
Aug 2002
25×257 Posts |
Quote:
We just use common sense and experience to guide us. Understanding file permissions helps, too.
|
|
|
|
|
|
|
#10 | |
|
Sep 2002
Database er0rr
373910 Posts |
Quote:
Last fiddled with by paulunderwood on 2007-09-07 at 20:53 |
|
|
|
|
|
|
#11 |
|
Jan 2006
JHB, South Africa
157 Posts |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Name Change? | Fred | Lounge | 8 | 2016-01-31 17:42 |
| How can I change worktype? | Andriy | Information & Answers | 1 | 2009-06-20 12:39 |
| User name change not reflected in BAD file | GP2 | Data | 3 | 2006-01-15 14:32 |
| How Can I Change The Computer ID | tmorrow | PrimeNet | 5 | 2004-05-18 11:53 |
| How to change Pxxxx.001 file to Pxxxx file? | edorajh | Software | 3 | 2003-12-31 12:30 |