UBB.Dev
Posted By: smoknz28 SSH - Setting File Permissions - 12/31/2003 6:11 PM
I'm VERY new to the world of puTTy and SSH and I'm looking for the correct format in setting the file permissions of all files inside of one directory at once instead of setting them for each file.

Any help on this is greatly appreciated.
Posted By: Ian_W Re: SSH - Setting File Permissions - 12/31/2003 9:52 PM

chmod -R 777 /your-directory

Where chmod is the command
-R means recursive
777 is the level of permissions
/your diretcory would include all files in that directory.
Posted By: Ian_W Re: SSH - Setting File Permissions - 12/31/2003 9:53 PM
BTW chmod --help should give you a few tips
Posted By: JoshPet Re: SSH - Setting File Permissions - 12/31/2003 11:28 PM
This is a great site too:

http://www.ss64.com/bash/

click on chmod for more info.
Posted By: smoknz28 Re: SSH - Setting File Permissions - 01/01/2004 7:10 PM
Awesome feedback on this one guys and it's much appreciated!

It was a piece of cake with the information you all provided and all files are done.

Again, thank you for the responses.
Posted By: smoknz28 Re: SSH - Setting File Permissions - 01/21/2004 7:40 AM
[]Ian_W said:

chmod -R 777 /your-directory

Where chmod is the command
-R means recursive
777 is the level of permissions
/your diretcory would include all files in that directory. [/]

I'm trying to run this on a directory with over 30 files and I'm not quite sure what the command line would be.

I'd like to change all of my files inside of my ubbthreads/avatars directory to 777.

So, would I need to change directories all the way til I come to ubbthreads or go to ubbthreads/avatars and then run the command in SSH:

chmod -R 777 /avatars
Posted By: donJulio Re: SSH - Setting File Permissions - 01/21/2004 8:00 AM
I don't know why you want them to be 777. It should be 666, just like the graemlins and post icons. Anyhow, the command you need is:

chmod 666 avatars/*.gif
or just
chmod 666 avatars/*

You can replace 666 w/ 777 if you really need the files to be executable, which I doubt

EDIT:
Here's a couple commands I use to set permissions quickly:

chmod 666 stylesheets/*.css includes/*.php filters/* languages/*/*.php images/icons/*.gif images/graemlins/*.gif images/avatars/*.gif theme.inc.php

&

chmod 777 includes/ stylesheets/ images/icons/ images/graemlins images/avatars/

Did I miss any? BTW: Those were just TWO commands, albeit long. Very useful however, and using the command line completion (the tab key), it goes very quickly
Posted By: smoknz28 Re: SSH - Setting File Permissions - 01/21/2004 5:08 PM
"donJulio", thanks and yes you are right...they should be 666.

Again, thanks for sending me those commands....awesome!
© UBB.Developers