icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Private Hosting » CHMOD Whole Directory

Private Hosting Questions about VPS, dedicated servers and colocation.

Reply
 
LinkBack Thread Tools Search this Thread
Old January 18th, 2005, 3:45 AM   #1 (permalink)
Registered User
Seasoned Poster
 
Dima's Avatar
 
Joined in Sep 2004
43 posts
Gave thanks: 0
Thanked 0 times
CHMOD Whole Directory

Was just wondering how I could chmod the whole directory lets say off public_html?

I tried chmod 777 public_html but that just chmod's the folder not the files inside of it. I been moving stuff to my new server from the old one with root user and now only root has control over my files!!


Thanks
__________________
Dima is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 18th, 2005, 3:47 AM   #2 (permalink)
Forum Moderator
Super #1
 
Ehaanaes's Avatar
 
Joined in Aug 2003
Lives in Norway
Hosted on Minerva
1,215 posts
Gave thanks: 0
Thanked 0 times
chmod -Rv 0777 public_html

But why are you doing this? It sounds scary!!

Edit: You don't need the v though. It just makes it verbose so you can see the changes while it's done.
__________________
Owner of Minerva and Server :: Beatiful P4's Surpass
http://www.case-spider.com
Winner of the Surpassies 2004 - Most Spirit. :bravo:
Google = Friend!
Ehaanaes is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 18th, 2005, 3:50 AM   #3 (permalink)
Registered User
Seasoned Poster
 
Dima's Avatar
 
Joined in Sep 2004
43 posts
Gave thanks: 0
Thanked 0 times
Why am I doing what? Chmoding?

Because I need to be able to edit my files... hehe - also im gonna change 777 to something like 644 on some folder for security
__________________
Dima is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 19th, 2005, 6:21 AM   #4 (permalink)
Registered User
Seasoned Poster
 
Dima's Avatar
 
Joined in Sep 2004
43 posts
Gave thanks: 0
Thanked 0 times
New problem!

I cant chmod! When I right click on my files in my directory /home/dima/public_html/files/ it says that the owner is r3mixed and I cant change the owner. In root I can chmod but it does not let me change the group nor the owner.

I use WinSCP3 by the way! Its pretty good... just some how all my files are owned by user r3mixed (its my friend's account but he has nothing to do with my files as I was rsync'ing them from my old server)

Weird!!
__________________
Dima is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 19th, 2005, 8:07 AM   #5 (permalink)
Registered User
Comfy Contributor
 
schupp's Avatar
 
Joined in Oct 2004
Lives in Reykjavík/Toronto
Hosted on Pass16/18
168 posts
Gave thanks: 0
Thanked 0 times
If you're using WinSCP then I assume that you have SSH access? From a command line you can run the chmod command as mentioned. But you really don't need 777 on anything except files/directories that the server itself needs to write. If you are the owner of the files then 644 for files is enough for you to edit them.
schupp is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 22nd, 2005, 9:19 PM   #6 (permalink)
Just Some Guy..
Comfy Contributor
 
Joined in Oct 2003
127 posts
Gave thanks: 0
Thanked 5 times
chown is the command to change ownership and group settings.

chown -R root.root /root/testdirectory

would change the owner and group to root of the test directory and everything inside it. (-R = Recursive)

Regards,

Aric
Aric is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 23rd, 2005, 6:29 AM   #7 (permalink)
Registered User
Seasoned Poster
 
Dima's Avatar
 
Joined in Sep 2004
43 posts
Gave thanks: 0
Thanked 0 times
whats root.root ?

well which one of them if the new owner?

say my previous file owner is r3mixed and new one dima.. how would i change the ownership of /home/dima/www/files/ ?
__________________
Dima is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 23rd, 2005, 3:06 PM   #8 (permalink)
Just Some Guy..
Comfy Contributor
 
Joined in Oct 2003
127 posts
Gave thanks: 0
Thanked 5 times
owner.group, just as it is listed in ls -la

Note that for cpanel, most of a user's files should have the same owner and group:

chown dima.dima /path/to/file

Regards,

Aric
Aric is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 23rd, 2005, 3:08 PM   #9 (permalink)
Registered User
Seasoned Poster
 
Dima's Avatar
 
Joined in Sep 2004
43 posts
Gave thanks: 0
Thanked 0 times
thanks i already figured it!
__________________
Dima is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On