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.

suphp installed - want to chown, but getting an error

Discussion in 'General Discussion' started by morrow95, Oct 13, 2012.

  1. morrow95

    morrow95 Well-Known Member

    Joined:
    Oct 8, 2006
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    Just changed from dso to suphp... changed all folders to 755 and all files to 644.

    Now, even though it appears my ownership for files is correct user:nobody for public_html and user:user for all contents of it (has always been that way so not sure why other people are differnt)... I still want to chown to make sure. I was using the following :

    Code:
    for i in `ls /var/cpanel/users/`; do chown -R $i:$i /home/$i/public_html ; done
     for i in `ls /var/cpanel/users/`; do chown $i:nobody /home/$i/public_html ; done
    Now, I am aware of the dangers when doing a recursive, but be aware that on my accounts I only have folders and files... nothing else... so the link issue should not apply to me. WARNING : Please look into this issue before trying the above code - see SysAdmin Tip: recursive chown can open your system for exploit « Power Prose and http://forums.cpanel.net/f5/switching-suphp-160421.html#post672869

    Problem is, when I enter the above commands I get an error back along the lines of invalid user ls or something similar - forget the exact response right now.

    So, can anyone help me out here... even though the sites are working fine I want to make sure the ownership is correct without viewing all the files.
     
Loading...

Share This Page