Directory permissions for website on Ubuntu 14.04

July 13, 2014 3k views


I recently deployed Ubuntu 14.04 droplet and installed Joomla! website on it and encountered a strange error.

I purposefully entered incorrect password and the website, in place of showing incorrect login error, shows a page which says "File for writing log is not writable". When I checked permissions, it was as same (755) as it was when I had earlier installed the same site one month ago.

I tried changing directory permissions but it didn't worked. When I used following command, it worked like a charm:

sudo chmod -R a+rw /dir-name

I am wondering, what does it really imply. I just copied this from some forum but don't know what does 'a+rw' or 'a+rx' implies.

Can someone pls help?

1 Answer

You should check that you've uploaded your files as the "serverpilot" user, not "root". Because PHP runs as your app's system user ("serverpilot" by default), if your the files and directories are owned by "root", PHP scripts won't be able to write to them.

There's more documentation on fixing file ownership issues here:

<a href=""></a>

Have another answer? Share your knowledge.