thanhhx57
By:
thanhhx57

All Directory in Joomla 2.5.14 unwritable.

September 2, 2013 11.8k views
Hi all, I just moved my site to store in DigitalOcean. I installed Virtualmin to manage VPS on Ubuntu 12.04 32bit. Everything goes well but can not write, clear the cache on site, ... :( All Directory in Joomla 2.5.14 unwritable. I have checked throught FTP (FileZilla) and they all seem to be set to 755 and files for 644. I do not know how to permission directories are writable. You know what helped me with. Thanks!
14 Answers
What's the output of this command?

sudo ps wwaux | grep apache


If the line begins with 'apache', you can follow this article: http://www.netadmintools.com/art560.html
Hi Kamal Nasser,

This is my screen output after running the command absh:

www-data 1349 0.0 1.6 51128 17152 ? S 06:40 0:14 /usr/sbin/apache2 -k start
www-data 3111 0.0 1.6 48900 16692 ? S 07:27 0:09 /usr/sbin/apache2 -k start
www-data 3112 0.0 1.6 50864 16764 ? S 07:27 0:08 /usr/sbin/apache2 -k start
www-data 5068 0.0 1.6 51384 16848 ? S 08:33 0:06 /usr/sbin/apache2 -k start
www-data 13915 0.0 1.4 47208 14744 ? S 13:19 0:01 /usr/sbin/apache2 -k start
www-data 14658 0.0 1.6 51380 16920 ? S 13:42 0:00 /usr/sbin/apache2 -k start
www-data 15690 0.0 1.6 49060 16912 ? S 14:03 0:01 /usr/sbin/apache2 -k start
www-data 16614 0.0 0.6 42508 7020 ? S 14:32 0:00 /usr/sbin/apache2 -k start
www-data 16615 0.8 1.6 48884 16544 ? S 14:32 0:00 /usr/sbin/apache2 -k start
root 16680 0.0 0.0 4384 812 pts/0 S+ 14:34 0:00 grep --color=auto apache
root 30003 0.0 0.9 41952 9924 ? Ss 04:50 0:02 /usr/sbin/apache2 -k start
www-data 31658 0.0 0.4 37600 4292 ? S 05:30 0:00 /usr/sbin/apache2 -k start
www-data 31777 0.0 1.6 50936 17044 ? S 05:32 0:13 /usr/sbin/apache2 -k start

I tried to follow the tutorial but with no success. This is the error I've encountered:

root@downsvn:~# chgrp apache administrator/backups
chgrp: invalid group: `apache'
root@downsvn:~# chgrp root administrator/backups
chgrp: cannot access `administrator/backups': No such file or directory
root@downsvn:~# cd /home/downsvn/public_html/
root@downsvn:/home/downsvn/public_html# chgrp root administrator/backups
chgrp: cannot access `administrator/backups': No such file or directory
root@downsvn:/home/downsvn/public_html# chgrp nobody administrator/backups
chgrp: invalid group: `nobody'
root@downsvn:/home/downsvn/public_html#

Please tell me where I was wrong & how I should do to correct. Thank you very much!

Run these commands instead:

cd /home/downsvn/public_html/

chrp www-data administrator/backups administrator/components administrator/modules administrator/templates cache components images images/banners images/stories language mambots mambots/content mambots/editors mambots/editors-xtd mambots/search mambots/system media modules templates
chmod g+w administrator/backups administrator/components administrator/modules administrator/templates cache components images images/banners images/stories language mambots mambots/content mambots/editors mambots/editors-xtd mambots/search mambots/system media modules templates
Hi Kamal Nasser,

This is the error I've encountered:

root@downsvn:~# cd /home/downsvn/public_html/
root@downsvn:/home/downsvn/public_html# chrp www-data administrator/backups administrator/components administrator/modules administrator/templates cache components images images/banners images/stories language mambots mambots/content mambots/editors mambots/editors-xtd mambots/search mambots/system media modules templates
-bash: chrp: command not found
root@downsvn:/home/downsvn/public_html# chrp www-data administrator/backups administrator/components administrator/modules administrator/templates cache components images images/banners images/stories language mambots mambots/content mambots/editors mambots/editors-xtd mambots/search mambots/system media modules templates
-bash: chrp: command not found
root@downsvn:/home/downsvn/public_html#
root@downsvn:/home/downsvn/public_html# chmod g+w administrator/backups administrator/components administrator/modules administrator/templates cache components images images/banners images/stories language mambots mambots/content mambots/editors mambots/editors-xtd mambots/search mambots/system media modules templates
chmod: cannot access `administrator/backups': No such file or directory
chmod: cannot access `images/stories': No such file or directory
chmod: cannot access `mambots': No such file or directory
chmod: cannot access `mambots/content': No such file or directory
chmod: cannot access `mambots/editors': No such file or directory
chmod: cannot access `mambots/editors-xtd': No such file or directory
chmod: cannot access `mambots/search': No such file or directory
chmod: cannot access `mambots/system': No such file or directory
root@downsvn:/home/downsvn/public_html# chrp www-data administrator/backups administrator/components administrator/modules administrator/templates cache components images images/banners images/stories language mambots mambots/content mambots/editors mambots/editors-xtd mambots/search mambots/system media modules templates
-bash: chrp: command not found
root@downsvn:/home/downsvn/public_html#

Please help me!

Thanks,
Thanh
My bad, it should be chgrp and not chrp. Please try that instead and see if they're writable
Hi Kamal Nasser,

Thank you very much.

I made the wrong commands & directories. I've revised it as follows & it was running fine.

chgrp www-data administrator/components administrator/language administrator/language/en-GB administrator/language/overrides administrator/manifests/files administrator/manifests/libraries administrator/manifests/packages administrator/modules administrator/templates components images images/banners images/icons images/joomla images/js images/plg_imagesized images/sampledata images/thumb language language/en-GB language/overrides libraries media modules plugins plugins/authentication plugins/captcha plugins/content plugins/editors plugins/editors-xtd plugins/extension plugins/finder plugins/quickicon plugins/search plugins/sh404sefcore plugins/sh404sefextplugins plugins/system plugins/user plugins/xmap templates configuration.php cache administrator/cache

chmod g+w administrator/components administrator/language administrator/language/en-GB administrator/language/overrides administrator/manifests/files administrator/manifests/libraries administrator/manifests/packages administrator/modules administrator/templates components images images/banners images/icons images/joomla images/js images/plg_imagesized images/sampledata images/thumb language language/en-GB language/overrides libraries media modules plugins plugins/authentication plugins/captcha plugins/content plugins/editors plugins/editors-xtd plugins/extension plugins/finder plugins/quickicon plugins/search plugins/sh404sefcore plugins/sh404sefextplugins plugins/system plugins/user plugins/xmap templates configuration.php cache administrator/cache

Thank you again,
Thanh
Hi all,

I have folder permissions as above, but when I made clear the cache in Joomla error: JCacheStorageFile::_deleteFolderFailed deleting...

You can see the picture more clearly to the problem.
http://i45.photobucket.com/albums/f72/hxt57/permissions_vps_zpsd1878710.jpg

I've replaced chmod 777 for cache folder but does not solve the problem. How do I do to fix it?

Thanks,
Thanh
@thanhhx57: The files in the cache folder should be chgrp'd to www-data as well:

sudo chgrp -R www-data /home/downsvn/public_html/cache
Hi Kamal,

I've done the command line, but the problem is still not solved. :(

root@downsvn:/home/downsvn/public_html# sudo chgrp -R www-data /home/downsvn/public_html/cache
Try to clear the cache again and paste the exact error.
Thanks Kamal, sudo chgrp -R www-data /home/myuser/public_html/directory worked like a charm!

Before I found this page I tried chown -R myuser:myusersgroup /home/myuser/public_html/directory* but it didn't work at all.
But now when I tried to update Joomla from 3.2.3 to3.2.4 with Joomla Update and Installation method "Write files directly" I get ERROR:
Could not open /home/myuser/public_html/joomla root directory/LICENSE.txt for writing. When I do sudo chgrp -R www-data /home/myuser/public_html/joomla root directory/LICENSE.txt it obviously works for that file as well. But to make the whole update work I guess I need to run sudo chgrp -R www-data /home/myuser/public_html/joomla root directory/

Is that a security risk to do sudo chgrp -R www-data /home/myuser/public_html/joomla root directory/ ?
I don't have any FTP server (and I don't want to have) so I can only use the direct method.
Have another answer? Share your knowledge.