View previous topic :: View next topic |
Author |
Message |
HydroSan l33t
Joined: 04 Mar 2004 Posts: 764 Location: The Kremlin (aka Canada)
|
Posted: Sun May 02, 2004 4:56 pm Post subject: [SOLVED] Changing multiple file and folder permissions? |
|
|
I know this is probably stupid, but how do I change around 4 to 5 different folders permissions including all files inside? I copied some stuff from an NTFS partition (which would only let me do it as root) to /home/(user), but it won't let me access them and I really don't feel like having to change every single files permission so a user or group 'wheel' can use them. _________________ I was a Gangster for Capitalism, by Major General Smedley Butler.
Server status: Currently down, being replaced with fresh install - 20% completed.
Last edited by HydroSan on Sun May 02, 2004 5:36 pm; edited 1 time in total |
|
Back to top |
|
|
befortin Apprentice
Joined: 10 Feb 2004 Posts: 193
|
Posted: Sun May 02, 2004 5:00 pm Post subject: |
|
|
You should use
Code: |
chown -R group:user directory1 directory2 directory3 directory4 file1 file2 file3 [...]
|
-R means recursively |
|
Back to top |
|
|
HydroSan l33t
Joined: 04 Mar 2004 Posts: 764 Location: The Kremlin (aka Canada)
|
Posted: Sun May 02, 2004 5:03 pm Post subject: |
|
|
So if I did...
Code: | chown -R group:user directory |
... then it would change every files' permission under that directory? Because right now only Root can read, write or execute the files, not the group or other. _________________ I was a Gangster for Capitalism, by Major General Smedley Butler.
Server status: Currently down, being replaced with fresh install - 20% completed. |
|
Back to top |
|
|
splooge l33t
Joined: 30 Aug 2002 Posts: 636
|
Posted: Sun May 02, 2004 5:19 pm Post subject: |
|
|
you'd use chmod instead of chown.
chmod 755 <filename>
the -R switch works with chmod also _________________ http://get.a.clue.de |
|
Back to top |
|
|
HydroSan l33t
Joined: 04 Mar 2004 Posts: 764 Location: The Kremlin (aka Canada)
|
Posted: Sun May 02, 2004 5:36 pm Post subject: |
|
|
Thanks both of you. I can access the files now. _________________ I was a Gangster for Capitalism, by Major General Smedley Butler.
Server status: Currently down, being replaced with fresh install - 20% completed. |
|
Back to top |
|
|
befortin Apprentice
Joined: 10 Feb 2004 Posts: 193
|
Posted: Sun May 02, 2004 5:42 pm Post subject: |
|
|
If you only do a chmod 755, you won't be able to modify any of the files. Chmod 755 will allow the owner (root) to modify and the group and others to only read and execute the files... Which is not what I understand that you wanted to do. Or maybe I didn't understood correctly what you wanted to do. |
|
Back to top |
|
|
HydroSan l33t
Joined: 04 Mar 2004 Posts: 764 Location: The Kremlin (aka Canada)
|
Posted: Sun May 02, 2004 5:43 pm Post subject: |
|
|
No. I first did a:
Code: | chown -R (user) (directory) |
And then a:
Code: | chmod 755 -R (directory) |
_________________ I was a Gangster for Capitalism, by Major General Smedley Butler.
Server status: Currently down, being replaced with fresh install - 20% completed. |
|
Back to top |
|
|
befortin Apprentice
Joined: 10 Feb 2004 Posts: 193
|
Posted: Sun May 02, 2004 6:47 pm Post subject: |
|
|
Yes, this will work. But actually, splooge wrote
Quote: | use chmod instead of chown |
|
|
Back to top |
|
|
|