| Private Hosting Questions about VPS, dedicated servers and colocation. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
|
|
#1 (permalink) |
|
Registered User
Seasoned Poster
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
__________________
|
|
|
|
|
|
#2 (permalink) |
|
Forum Moderator
Super #1
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 Surpasshttp://www.case-spider.com Winner of the Surpassies 2004 - Most Spirit. :bravo: Google = Friend! |
|
|
|
|
|
#3 (permalink) |
|
Registered User
Seasoned Poster
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 ![]()
__________________
|
|
|
|
|
|
#4 (permalink) |
|
Registered User
Seasoned Poster
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!!
__________________
|
|
|
|
|
|
#5 (permalink) |
|
Registered User
Comfy Contributor
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.
|
|
|
|
|
|
#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 |
|
|
|
|
|
#7 (permalink) |
|
Registered User
Seasoned Poster
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/ ?
__________________
|
|
|
|
|
|
#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 |
|
|
|