File Permissions - Again!


Looks like I did a stupid thing and bulk-changed files/folders chmod permissions. Can someone give me a heads-up on how they should be? :confused:

Depends on your hosting… But for suPHP and cpanel

Owner - cpanel user name

Group - cpanel user name

Dir perms - 755

File perms - 644

This applies to all files/dirs in your document root. Note that normally the document root itself is mode 750 and owned by cpanel-user and group 'nobody'.

But you should check with your hosting provider to see what they should be.

Remember to change the default file permissions in config.local.php to match the perms used by your hosting.

Thanks for the reply, however I am an on shell access. What I changed was var and its contents and kinda restored it to 775 for the folders and 664 for the files.

I am wondering if there are any specific permissions for specific kinds of files like .htaccess, etc.

By the way, can anyone tell me the purpose of the var directory? Even completely deleting it and everything seems to be working fine… unless something comes up and I end up having serious issues.

It will probably be recreated with permissions of whatever you have for the default permissions in config.local.php.

This is where most created files are stored. I.e. uploads, upgrades, caches, etc.