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.

colors of files in public_html

Discussion in 'General Discussion' started by xml, Mar 6, 2014.

  1. xml

    xml Well-Known Member

    Joined:
    Jan 15, 2004
    Messages:
    76
    Likes Received:
    1
    Trophy Points:
    8
    I noticed the colors of all files is green with star in puplic_html as shown in the attachement, is that normal?
     

    Attached Files:

  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    The asterisk indicates the file is executable. I suggest reviewing the permissions of your files. Typically, files you want users to see should be configured to 0644 permissions.

    Thank you.
     
  3. xml

    xml Well-Known Member

    Joined:
    Jan 15, 2004
    Messages:
    76
    Likes Received:
    1
    Trophy Points:
    8
    I found that all files in puplic_html folder and its subfolders being 0755, the question is how to convert the files to 0644 by one line ssh command line?

    is this command line safe to use:
    find /home/$user/public_html/. -type f -exec chmod 644 {} \;
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I don't recommend a command that recursively updates file permissions. Let's say the account intentionally sets a file to lower permissions, or it's a CGI file that legitimately requires 0755 permissions. A command that changes permissions on all files could potentially lead to more problems. Make sure you know exactly what files are updated and verify it's acceptable if you do choose to use a bash script to update permissions on multiple files.

    Thank you.
     
Loading...

Share This Page