Skip to content
You are here: Home
File/Directory Permission Problems (wwwrun problem)
Written by Sigrid Suski   

If you run your Joomla and SobiPro 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 SobiPro are done by the web server (if FTP layer is off).

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 SobiPro, 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. Also if you install SobiPro using the Joomla! FTP Layer, all files and folders belong to 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 (if FTP layer is off)

  • You have copied a file via FTP to your web space, SobiPro wants to write to this file but it has no rights.
  • You have created a directory via FTP, SobiPro wants to create a subdirectory (during the installation process, 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 (SobiPro) 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. Safe Mode and similar settings should be turned off if using Joomla!

So why not turning the Joomla FTP layer on?

The answer is quite simple: because Joomla! FTP layer slows down writing to your web server as it creates an extra FTP socket to transfer the data.

Another reason is, that SobiPro includes some 3rd party libraries which don't use the Joomla FTP layer. That means, that some SobiPro functions don't work.

Additional Information

POSIX Access Control Lists on Linux
Linux Administration Handbook - Access Control Lists
Become a SobiPro Gold Club Member