Forum > General SMF Forum

About using chmod to secure files


As I understand it, I should use chmod to secure my files, but how exactly does this work?  What is the syntax, etc and which files do I secure? 

I assume it's all files under public_html but not sure which directory to be honest.  I have a shared hosting acct with greyweb (great people) and am familiar with cpanel and so on, but I have little linux/unix experience.  All help greatly appreciated.

You would use chmod or file manager on linux. I do not use linux much for webservers so I do know a lot. Generally I see people use 644 or 755 permissions.

Many thanks.  So I would use 644 or 755 permissions?  Can you elaborate on this more?  How does the syntax go? 
As to you saying 'use chmod or file manager on linux', do you mean the file manager under cpanel?

I am not really an expert in this area. You would do either via cmd line or cpanel file manager.

OK, many thanks for the pointer and sorry for late reply, only I'm between forums (smfhacks and the official smf one) and a whole lot of other things...
I've found out how to do it using cPanel by clicking on the icon for the required folder or file and selecting permissions from the pop-up menu.  A table then comes-up showing me the chmod settings for that folder or file.  Almost invariably files are set to 644 and folders to 755 by default - people on the official forum have told me what I should change them to.  Anyway, thanks for your help  :)


[0] Message Index

Go to full version