colors of files in public_html

xml

Well-Known Member
Jan 15, 2004
88
2
158
I noticed the colors of all files is green with star in puplic_html as shown in the attachement, is that normal?
 

Attachments

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
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.
 

xml

Well-Known Member
Jan 15, 2004
88
2
158
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 {} \;
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
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.