Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Changing multiple file and folder permissions?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
HydroSan
l33t
l33t


Joined: 04 Mar 2004
Posts: 764
Location: The Kremlin (aka Canada)

PostPosted: Sun May 02, 2004 4:56 pm    Post subject: [SOLVED] Changing multiple file and folder permissions? Reply with quote

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. 8O
_________________
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
View user's profile Send private message
befortin
Apprentice
Apprentice


Joined: 10 Feb 2004
Posts: 193

PostPosted: Sun May 02, 2004 5:00 pm    Post subject: Reply with quote

You should use

Code:

chown -R group:user directory1 directory2 directory3 directory4 file1 file2 file3 [...]


-R means recursively
Back to top
View user's profile Send private message
HydroSan
l33t
l33t


Joined: 04 Mar 2004
Posts: 764
Location: The Kremlin (aka Canada)

PostPosted: Sun May 02, 2004 5:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
splooge
l33t
l33t


Joined: 30 Aug 2002
Posts: 636

PostPosted: Sun May 02, 2004 5:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
HydroSan
l33t
l33t


Joined: 04 Mar 2004
Posts: 764
Location: The Kremlin (aka Canada)

PostPosted: Sun May 02, 2004 5:36 pm    Post subject: Reply with quote

Thanks both of you. I can access the files now. :lol:
_________________
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
View user's profile Send private message
befortin
Apprentice
Apprentice


Joined: 10 Feb 2004
Posts: 193

PostPosted: Sun May 02, 2004 5:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
HydroSan
l33t
l33t


Joined: 04 Mar 2004
Posts: 764
Location: The Kremlin (aka Canada)

PostPosted: Sun May 02, 2004 5:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
befortin
Apprentice
Apprentice


Joined: 10 Feb 2004
Posts: 193

PostPosted: Sun May 02, 2004 6:47 pm    Post subject: Reply with quote

Yes, this will work. But actually, splooge wrote

Quote:
use chmod instead of chown
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum