Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have just switched from shared hosting to a centOS VPS. I'm using my VPS to run a few blogs and Joomla websites. Whenever I try to install Joomla / Wordpress, I always have permission issues. There are always some files that can't be written to. As a solution, I have to chmod everything to 777 and then 755. Is there any way to automatically set correct permissions for these folders?

I never had any permission issues while using shared hosting. Any idea how they configure their servers?

Thanks in advance

share|improve this question

It's not automatic, but find out what user owns the process writing to those files, and change ownership to that user. Then you can restrict to 644.

And stop putting execute permission on output files!

share|improve this answer

What is your umask?

From a shell prompt, do



umask -S

If the result is "0022" that corresponds to "755" (7 - 2 = 5).

Look in your /etc/profile or $HOME/.profile to see where it's being set and change it, probably to 002 (you can ignore the other leading zero).

Edit: Rather than changing umask in your profile, It's probably better to do it at the command line only when needed (or in a script - when the script exits, it returns to your "default").

share|improve this answer
just be careful with this - so that you only make files you NEED to make writeable :) – warren Sep 17 '09 at 6:41
@warren: Very important advice. I've edited my answer. – Dennis Williamson Sep 17 '09 at 7:00
crud - my vote for your answer got dropped because i clicked the wrong spot :( – warren Sep 17 '09 at 11:56

Use FileZilla FTP client and chmod all folders to 0755 and files to 0644. It allows recursive chmodding files and folders separately.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.