Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Installation Help
Author Message
CodyG
Life Cycles Becoming CPU Cycles



Joined: Jan 02, 2003
Posts: 714
Location: Vancouver Island

PostPosted: Sun Oct 29, 2006 11:25 am Reply with quote

I create a .zip on my windows machine then transfer it to my linux server while logged in as root.
I unzip the archive and all phpnuke files and dirs are neatly placed. ... all good, and fast!

But... now there are no linux permissions on all those files and dirs and everything is owned by root.

Therefore, saving time unzipping on the server is wasted by manually chmoding files and dirs.

I can chmod all files and dirs to 644
chmod -R 644
easy

But what about the directories?

I think what I'm looking for is a shell script that will pipe a list of /public_html subdirectories to a file ...

something like:
find . -type d -print

and/or then chmod the dir paths listed in the file.

Perfectly clear?

Or am I going down the wrong path on this idea? Wink

Any help, clues and urls are all welcome. I've been searching pages for days and days looking for any answer, but haven't found it yet.

_________________
"We want to see if life is ubiquitous." D.Goldin 
View user's profile Send private message
gregexp
The Mouse Is Extension Of Arm



Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Sun Oct 29, 2006 2:00 pm Reply with quote

So you want to chmod all the directories seperate from the files within?

Man I forgot how I did this, Ill look into it and see if I cant remember how I did all that.

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
CodyG







PostPosted: Sun Oct 29, 2006 2:19 pm Reply with quote

Yes... as in phpnuke directories 644, files 755
thanks. Smile
 
Dauthus
Worker
Worker



Joined: Oct 07, 2003
Posts: 211

PostPosted: Sun Oct 29, 2006 2:53 pm Reply with quote

I posted this a while back in the Knowledge Base of another website. I thought it would be relevant in this discussion:

--------------------------------------------------------------------------------------

The most useful trick I have found is how to change the permissions of an entire website using two simple commands. Let's say you just installed a program with several hundred files of different types and folders. Now you want to change all the directories to 0755 and all the files (no matter what the extension) to 0644. SSH into your box and change to the proper directory. In this example html is the directory. Use the following command:


cd /var/www/html


Next you want to change the permissions of every folder and file at the same time. Type this command to change all the folders to the permission of 0755 and hit enter:

find . -type d -exec chmod 755 {} \;


Next you change all the files to 0644 by typing this and hitting enter:


find . -type f -exec chmod 644 {} \;


Now if you review all your files and folders, you will see they have all been changed to what you wanted them to be.

_________________
Image
Vivere disce, cogita mori 
View user's profile Send private message Visit poster's website
CodyG







PostPosted: Sun Oct 29, 2006 4:34 pm Reply with quote

Dauthus!
It works!
thank you!
hugs

RavensScripts
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Installation Help

View next topic
View previous topic
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©