LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-15-2005, 02:25 PM   #1
UnforgotteN
LQ Newbie
 
Registered: May 2005
Posts: 16

Rep: Reputation: 0
question


Hello,

What is the command to give certain permissions to a folder and all the folders in it?

i use chmod <number> <foldername> but it only gives those permission i assinged to that folder, then i have to go in that folder use the same command to give permissions to the other folders in it.

John.
Thanks!
 
Old 06-15-2005, 02:28 PM   #2
Kdr Kane
Member
 
Registered: Jan 2005
Distribution: SUSE, LFS
Posts: 357

Rep: Reputation: 30
http://linux.ctyme.com/man/man0326.htm

-R

or --recursive
 
Old 06-15-2005, 02:29 PM   #3
UnforgotteN
LQ Newbie
 
Registered: May 2005
Posts: 16

Original Poster
Rep: Reputation: 0
so chmod -R <number> <foldername> ?
 
Old 06-15-2005, 02:32 PM   #4
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
if you want to use this to all the files inside a fonder (including all the subfolders) try
Code:
chmod -R <number> <path to the folder>
If you want to use it in the fonder and subfolders only (not all the other files that are not directories) try:

Code:
find <path to the folder> -type d -exec chmod <number> {} \;
 
Old 06-15-2005, 02:36 PM   #5
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
ALSO, BE CAREFUL with the permissions. and especially those recursive commands. YOU CAN EASILY BREAK YOUR SYSTEM. AND RESPECT THE PERMISSIONS.

where do you want to apply this ?
 
Old 06-15-2005, 02:51 PM   #6
UnforgotteN
LQ Newbie
 
Registered: May 2005
Posts: 16

Original Poster
Rep: Reputation: 0
oh no worries... i just want to change permissions for some folders on a game im hosting for my clan.

Last edited by UnforgotteN; 06-15-2005 at 02:56 PM.
 
Old 06-15-2005, 02:52 PM   #7
UnforgotteN
LQ Newbie
 
Registered: May 2005
Posts: 16

Original Poster
Rep: Reputation: 0
alright, ill try it. Thanks alot guys!
 
Old 06-15-2005, 02:58 PM   #8
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
A.. and something else ,that a more geek than me would have mentioned
this from the beginning (but not me )

There are no folders in Linux. Only directories
I was just trying to use your language.

Have fun...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question, Apples Contribution to Open Source + MacOs file structure question Higgy3k Other *NIX 5 07-25-2005 04:23 AM
Not your regular GRUB question - just a short question for a fried MBR!! ziphem Linux - General 3 01-31-2005 01:51 PM
2 part question: Speeding up MDK9.1/GNOME question wardialer Linux - Newbie 6 10-14-2004 03:16 PM
login prompt question & kde scheme question JustinCoyan Slackware 2 06-09-2004 02:02 PM
RE: Suse 8.0 hardware question {newbie question, pls help} Radiouk Linux - Distributions 2 06-04-2002 12:53 PM


All times are GMT -5. The time now is 03:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration