|File/Directory Permission Problems (wwwrun problem)|
|Written by Sigrid Suski|
If you run your CMS (Joomla!/Mambo) and SOBI2 on a Linux based web server with "apache2handler" or "apache" as PHP interface, you have to keep in mind the permission and owner system of Linux.
In general there are two "users". The first user is the Apache web server and the second user is the FTP user. All actions, performed by SOBI2 are done by the web server. Also in Joomla! 1.5 SOBI2 acts as the web server because SOBI2 does not support the Joomla! 1.5 FTP Layer!
What a user can do with the files or directories depends on the owner of them.
Permission and Owner Flags
There are three permission flags and three owner flags for each file or directory which control access rights.
Now you have to determine for each file/directory which user may do what.
The web server needs read and write access, because it is responsible for presenting a site to the visitors (read access) and for installing new components and uploading files (images etc.) it needs write access.
The most frequent problems which occur
These problems often happen if you copy a complete local installation to your web server via FTP.
If you create a directory via FTP, the FTP user is the owner. The web server (and SOBI2) can only write to this directory if it has write access. Because the FTP user is the owner it cannot write to this directory if it is set to 755.
If your server is well configured, at least the group of both users (FTP and web server) should be the same. In this case you can set the permission flags to 775 and the web server (SOBI2) can write to a directory created via FTP.
If FTP user and web server are not within the same group you have to set the permission flags to 777/666 which is really not recommended.
We experienced as a good setting:
If your FTP user and web server are not within the same group and you are not able to set the owner and group rights, or if it is but you want to set the flags to 755/644 because of safety reasons, you should never copy files or create directories using FTP. In this cases use JoomlaXplorer for that because it acts (like every component) as the web server.
Another special case is, that other restrictions of your server, like the Safe Mode, limit write access to the owner of a directory/file only. In this cases, setting the permission flags to 777/666 don't help. Safe Mode and similar settings should be turned off if using Joomla!/Mambo
One of the common problems is, that the necessary directories could not be created during the installation process.
If a directory is missed, create it using JoomlaXplorer.
Additional InformationPOSIX Access Control Lists on Linux
Linux Administration Handbook - Access Control Lists