The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Default ownership for main directories

Discussion in 'General Discussion' started by AnthonyG70, Jan 27, 2013.

  1. AnthonyG70

    AnthonyG70 Member

    Joined:
    Apr 21, 2012
    Messages:
    7
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Was a late nite a few days ago, and while working with a couple SSH windows opened I inadvertently ran a chown command on the base directory (won't say root directory, as that's different). I immediately noticed my mistake but was unable to find any help online to set the directories back to the original ownership. I set the owner to root:root, after setting it to nobody:nobody during the mistake. Things seem to be working, but I want to check with another server owner to see if I set them back right.

    Here is the output of my ./ directory:

    Code:
    # ls -la
    total 230
    29 root   root    4096 Jan 27 10:49 ./
    29 root   root    4096 Jan 27 10:49 ../
    1 root   root       0 Jan 27 10:32 .autofsck
    1 root   root       0 Jan 20 07:15 .autorelabel
    2 root   root    4096 Jan 21 17:00 bin/
    4 root   root    1024 Jan 20 07:35 boot/
    11 root   root    3900 Jan 27 10:33 dev/
    100 root   root   12288 Jan 27 11:15 etc/
    1 nobody nobody    18 Jan 27 10:49 .forward
    2 root   root    4096 Jan 20 07:38 .gnupg/
    15 root   root    4096 Jan 27 00:28 home/
    4 root   root    4096 Jan 25 05:13 home2/
    11 root   root    4096 Jan 20 08:23 lib/
    8 root   root    4096 Jan 21 04:06 lib64/
    2 root   root   16384 Jan 20 01:02 lost+found/
    2 root   root    4096 Oct  1  2009 media/
    2 root   root       0 Jan 27 10:32 misc/
    2 root   root    4096 Oct  1  2009 mnt/
    2 root   root       0 Jan 27 10:32 net/
    10 root   root    4096 Jan 23 08:01 opt/
    2 root   root    4096 Jan 20 08:06 perl5/
    171 root   root       0 Jan 27 04:31 proc/
    1 root   root    9216 Jan 27 13:43 quota.user
    1 root   root    1024 Jan 20 08:13 .rnd
    14 root   root    4096 Jan 27 00:28 root/
    2 root   root   12288 Jan 21 17:00 sbin/
    1 root   root      25 Jan 20 07:17 scripts -> /usr/local/cpanel/scripts/
    2 root   root    4096 Jan 20 07:05 selinux/
    2 root   root    4096 Jan 20 08:13 .spamassassin/
    2 root   root    4096 Oct  1  2009 srv/
    11 root   root       0 Jan 27 04:32 sys/
    3 root   root    4096 Jan 20 07:07 tftpboot/
    5 root   root   20480 Jan 27 13:15 tmp/
    17 root   root    4096 Jan 20 09:10 usr/
    29 root   root    4096 Jan 27 10:33 var/
    Could someone verify whether or not the ownership is correct? I don't have access to a second server to check them myself. Though maybe someone here could check theirs to compare for me. It would be greatly appreciated.
     
  2. CitizenK

    CitizenK Well-Known Member

    Joined:
    Jun 5, 2012
    Messages:
    64
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    On The Road
    cPanel Access Level:
    Root Administrator
    Hello,

    I have looked at your output, however it does not apear to contain the permissions of the directories so I can not provide any recommendations. I can provide below the default permissions for the / directory.

    Code:
    # ls -la /
    drwxr-xr-x  22 root root      4096 Jan 25 00:06 ./
    drwxr-xr-x  22 root root      4096 Jan 25 00:06 ../
    -rw-r--r--   1 root  root         0 Jan 13 17:30 .autofsck
    dr-xr-xr-x   2 root root      4096 Jan 13 18:24 bin/
    dr-xr-xr-x   3 root root      4096 Jan 10  2012 boot/
    drwxr-xr-x   7 root  root      1860 Jan 13 17:30 dev/
    drwxr-xr-x  73 root root     12288 Jan 28 00:06 etc/
    drwx--x--x  10 root root      4096 Jan 24 17:13 home/
    dr-xr-xr-x   9 root root      4096 Jan 13 18:24 lib/
    dr-xr-xr-x   7 root root     12288 Jan 13 18:24 lib64/
    drwxr-xr-x   2 root root      4096 Sep 23  2011 media/
    drwxr-xr-x   2 root root      4096 Sep 23  2011 mnt/
    drwxr-xr-x  10 root root      4096 Jan 24 17:25 opt/
    dr-xr-xr-x 136 root root         0 Jan 13 17:30 proc/
    dr-xr-x---  16 root root      4096 Jan 28 00:20 root/
    dr-xr-xr-x   2 root root      4096 Jan 13 18:24 sbin/
    lrwxrwxrwx   1 root root        25 Jan 13 17:29 scripts -> /usr/local/cpanel/scripts/
    drwxr-xr-x   2 root root      4096 Sep 23  2011 selinux/
    drwxr-xr-x   2 root root      4096 Sep 23  2011 srv/
    drwxr-xr-x   3 root root         0 Jan 13 17:30 sys/
    drwxrwxrwt  10 root root      4096 Jan 28 00:07 tmp/
    drwxr-xr-x  14 root root      4096 Jan 24 17:24 usr/
    drwxr-xr-x  22 root root      4096 Jan 22 17:30 var/
    
     
  3. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    If you didn't do "chown -R" they should be just fine :)
     
  4. AnthonyG70

    AnthonyG70 Member

    Joined:
    Apr 21, 2012
    Messages:
    7
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    That's what I was looking for, the / directory ownership. Seems I have a few more items in there than you, new box install a few weeks ago. What was confusing me is the .forward that is there, it's for the root account emails, although there is a .forward in the /root folder as well. My emails are sitting in the queue and not being delivered unless I do so manually, although other emails for clients are moving just fine. So I was thinking that the ownership for the /root folder was not valid as I had setup forwarding via CP for root and system messages before the mistake, and added (via CP) the forward for the nobody messages the other day and noticed that new .forward present (with strange ownership).
     
    #4 AnthonyG70, Jan 27, 2013
    Last edited: Jan 27, 2013
Loading...

Share This Page