Skip to content
You are here:
File/Directory Permission Problems (wwwrun problem)

If you run your CMS (Joomla!/Mambo) and SOBI2 on a Linux based web server 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.

What a user can do with the files or directories depends on the owner of them.
Who is the owner of a file or directory?
If you install SOBI2, or any other component, the component files and directories belong to the web server because the installation process is done by the web server.
If you copy a file/create a directory via FTP to your web space (server) the owner of this file/directory is the FTP user.

Permission and Owner Flags

There are three permission flags and three owner flags for each file or directory which control access rights.

  • Permission Flags: read, write, execute/search
  • Owner Flags: User (owner), Group, World

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 owner (user) of a file should have always write access.

What does 755 (directory) / 644 (file) mean:
  • User (Owner): may read and write
  • Group: may only read
  • World: may only read
What does 775 (directory) / 664 (file) mean:
  • User (Owner): may read and write
  • Group: may read and write
  • World: may only read
What does 777 (directory) / 666 (file) mean:
  • User (Owner): may read and write
  • Group: may read and write
  • World: may read and write

The most frequent problems which occur

  • You have copied a file via FTP to your web space, SOBI2 wants to write to this file but it has no rights.
  • You have created a directory via FTP, SOBI2 wants to create a subdirectory (during the installation process of plugins, etc.) and has no rights for that.

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:
Owner of a directory/file can be the web server or FTP user, the directories and files should belong to the group of apache (web server) and the group has write access (775/664).

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

SOBI2 Troubleshooting

One of the common problems is, that the necessary directories could not be created during the installation process.
If the directories don't exist you will get errors like "Error moving file" when you try to upload files or you won't be able to install a SOBI2 plugin.

If a directory is missed, create it using JoomlaXplorer.

  • After installation of SOBI2 check if the image directory is created: /images/com_sobi2/clients
  • After installation of the Gallery plugin check if the image directory is created: /images/com_sobi2/gallery
  • After installation of the Media plugin check if the media directory is created: /images/com_sobi2/media

Additional Information

POSIX Access Control Lists on Linux
Linux Administration Handbook - Access Control Lists

Digg!Del.icio.us!Google!Facebook!Slashdot!Netscape!Technorati!Yahoo!Ma.gnolia!