The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 46 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Mon May 07, 2012 12:40 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 07, 2012 12:10 pm
Posts: 27
Hi,

After struggling through this forum I have not found an answer to my problem, eventho it has been addressed quite a few times. The issue is about the writability of the files ans directories that need it.

I am running
Fedora 16
Apache 2.2.22
PHP 5.3.10
MySQL 5.5.22

I tried about everything in the book, that I could think of to lift the tip of the iceberg; as a last resort I even changed the file-permissions to 777 using chmod -R 777 * and changing the owner using chown -R apache:apache *. (I am aware of the security issues, but I wanted to figure out why things were nog working).
(I figured apache was the correct web-user, by ps -ef | grep httpd)

The way I installed Joomla! was
1 downloading the zipped package and extracted in.
2 copying the entire directory to my webserver (localhost, so I just copy and pasted it)
3 running the installation through my webbrowser, during which I already was confronted with a missing configuration.php. But I was assured I could create this manually at the end, but c&p'ing the texts into a needed file.

After installation everything worked fine, but when I wanted to install a new ... I was confronted with some errors. Looking at the "Site/System Information/Directory Permissions" showed me that everything was unwrittable.
Then I started to fiddle around with the permissions to see what happened, eventually setting them to 777. But even then the Directory Permissions were said to be unwrittable.

What am I missing here?

TIA
Herry


Last edited by humvee on Thu May 17, 2012 2:00 am, edited 1 time in total.
Marked as resolved as user moving away from use of Joomla!


Top
 Profile  
 
PostPosted: Mon May 07, 2012 5:43 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Wed Aug 17, 2005 10:27 pm
Posts: 14709
Location: Kent, England
Probably file ownership issues rather than permissions. These 7 articles http://docs.joomla.org/Security_Checkli ... ng_Started ...and on will probably give you an idea.

If you are solely using this as a local development server you might consider installing XAMPP instead.


Top
 Profile  
 
PostPosted: Mon May 07, 2012 7:25 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 07, 2012 12:10 pm
Posts: 27
humvee wrote:
Probably file ownership issues rather than permissions. These 7 articles http://docs.joomla.org/Security_Checkli ... ng_Started ...and on will probably give you an idea.

If you are solely using this as a local development server you might consider installing XAMPP instead.


Thanks for your response, Humvee. I will check the articles out. But I fear I read them already, as I read so much today.
I'd prefer to stick with my current setup, as I am experienced with it for so long. I've been working with MySQL/Perl since 1997 and changed to PHP about 6 years ago. So far I always built my own codes from scratch.

For the same amount of time I have worked with Linux, mostly Red Hat / Fedora, and I am quite familiair with file/dir permissions and ownership, so that's the main reason why this puzzles me so much. I mean,
I did "ps -ef | grep httpd". That learnt me that "apache" was the user running httpd.
So I even did "chown -R apache:apache *" and also "chown apache:apache .", so the root-dir also was owned by apache.
And I even tried "chmod -R 777 *" and "chmod 777 ."
I can't imagine anything to go further than that.

Anyway, I'll take a look at the articles now...


Top
 Profile  
 
PostPosted: Mon May 07, 2012 7:38 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 29, 2006 12:35 pm
Posts: 32
Location: Lyon, France
did you try to give the permissions to mister www-data, group www-data ?


Top
 Profile  
 
PostPosted: Mon May 07, 2012 7:45 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 07, 2012 12:10 pm
Posts: 27
mig69 wrote:
did you try to give the permissions to mister www-data, group www-data ?


Unfortunately both group and user do not exist on my system.
(before I wrote this I still tried, but go "chown: invalid user:" and "chown: invalid group".

I guess there must be something funny in the way I put the files on the server, as I just unzipped the Joomla package and "drag&dropped" the files/dirs to the location where my webfiles are...


Top
 Profile  
 
PostPosted: Mon May 07, 2012 8:14 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 29, 2006 12:35 pm
Posts: 32
Location: Lyon, France
hmmmm... the fact that all the files are unwritables is strange...
may be an error in the config file adressing a wrong directory ?
i'm using debian, and i'm sure that files accessed by apache on this system are those belonging to mister www-data. it is strange that this user is invalid on fedora. may be you can take a look at that... The files for mister www-data are in /var/www.
Courage, as we say in french (i don't know the translation ;-)


Top
 Profile  
 
PostPosted: Mon May 07, 2012 8:32 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 07, 2012 12:10 pm
Posts: 27
mig69 wrote:
hmmmm... the fact that all the files are unwritables is strange...
may be an error in the config file adressing a wrong directory ?
i'm using debian, and i'm sure that files accessed by apache on this system are those belonging to mister www-data. it is strange that this user is invalid on fedora. may be you can take a look at that... The files for mister www-data are in /var/www.
Courage, as we say in french (i don't know the translation ;-)


apache is the user running httpd, like it is www-data in Debian. In older Red Hat versions I remember httpd ran as user "nobody".

I doubt whether it is the wrong files... Example
configuration.php is unwritable. But it is being read, because it contains the database-setting, and Joomla *is* working, by default. I can't change anything to it, cos al the needed files and directories are uwritable, but I can create articles and such...

I now deleted the installation and tried to get it working with a writable configuration.php. But there's still no way I can get this file to become writable. Still, even with permissions set to 0777 and owner to apache:apache it still doesn't work.


Top
 Profile  
 
PostPosted: Mon May 07, 2012 9:27 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Wed Aug 17, 2005 10:27 pm
Posts: 14709
Location: Kent, England
Please run the Forum Post Assistant to provide the information to help us resolve the issue.


Top
 Profile  
 
PostPosted: Mon May 07, 2012 11:09 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 07, 2012 12:10 pm
Posts: 27
Hi again... using FPA appeared to be weird... It's almost 1 a.m. so I'll go to sleep in a minute (have to get up early). But here are my first findings.
In both Firefox and Chrome I was left with a white screen; nothing seemed to happen.
So I went into a terminal and ran "php fpa-en.php" manually. This scrolled a lot of information. So I repeated the process like this "php fpa-en.php > result.php" and then I got some error-messages, like the ones below.
After that I looked into my browser and to show "result.php" and it magically showed me that all cores directories were indeed writable. This in contrast to what Joomla Admin tells me.
Next I should copy the "post detail", but all that happens when I hit the "Click here to generate post"-button, is that the form collapses and I am left with all the server info on a huge screen.

Anyway, the earlier mentioned errors I get seem to have something to do with environment variables, as it tell info (short version):
PHP Notice: Undefined index: act in /var/www/vhosts/{domain}/fpa-en.php on line 297
PHP Stack trace:
PHP 1. {main}() /var/www/vhosts/{domain}/fpa-en.php:0
PHP Notice: Undefined index: SERVER_SOFTWARE in /var/www/vhosts/{domain}/fpa-en.php on line 501
then it goes on complaining about two other missing variables:
SERVER_NAME
HTTP_ACCEPT_ENCODING
on various lines from 1052 til 1057

NB I deliberately left out the domainname, as the project I am trying to set up should be kept unknown til the day of release.

Well, no matter what fpa-en.php shows me -I got a bit excited by the "writable" messages, and tried to install an extension again- it still does not work. Trying to install the extension show the message:
JFolder::create: Could not create directory
Template Install: Failed to create directory: /var/www/vhosts/{domain}/templates/{extension}

Thanks so far!!!


Top
 Profile  
 
PostPosted: Mon May 07, 2012 11:13 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 07, 2012 12:10 pm
Posts: 27
I still see something funny tho...
Config version 1.5 CMS Mis-match
which is funny as everything was out of 1 zipfile

AND

MySQL support J!2.5 => NO


Top
 Profile  
 
PostPosted: Tue May 08, 2012 7:09 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Wed Aug 17, 2005 10:27 pm
Posts: 14709
Location: Kent, England
The whole point of the FPA is that you it is a Post Assistant for the Forum that means you follow the instructions and post the prepared output to this topic so that we can look at it.

If you don't follow instructions over the FPA chances are you did not follow instructions over the installation either in some way.

Please help yourself by providing the information required.


Top
 Profile  
 
PostPosted: Tue May 08, 2012 9:00 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 07, 2012 12:10 pm
Posts: 27
humvee wrote:
The whole point of the FPA is that you it is a Post Assistant for the Forum that means you follow the instructions and post the prepared output to this topic so that we can look at it.

If you don't follow instructions over the FPA chances are you did not follow instructions over the installation either in some way.

Please help yourself by providing the information required.


I can assure you that I am 100% sure I did install FPA correctly. It wasn't that hard anyway. After all it's 6 step things, telling me to download, unzip, do some reading (which I did), copy the file to the webroot where Joomla resides and then I should get a page.
But I just did not see any page: in both Firefox and Chrome my screen stayed white, and there wasn't even anything in the page-source. I can't possibly post something that is not there.

So I exported the page by running "php fpa-en.php > result.php", this way creating a php-file with the output of the fpa-en.php and have my browser show this page.
I emphasize, this was THE ONLY WAY to actually see any response from the fpa-en.php script.
I suspect there's some deadlock in the script or something like that, which prevents it from displaying normaly. The error messages I got in my console started with complaning about a variable called "act".

Next step was to have the page provide me with some output, that I needed to post. According to the manual on the page where I dl-ed FPA, I was supposed to click on
the "Show the Forum Post Assistant" and a section unfolded before me.
I did what as the manual said, but all that happened what the closing of the just unfolded section.
Next I get a message saying "Hang on in there while we run some tests..." but it just stays there like forever. So, still NOTHING TO POST in here.

I am clueless... I Joomla suitable for Fedora systems at all???


Top
 Profile  
 
PostPosted: Tue May 08, 2012 9:06 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Wed Aug 17, 2005 10:27 pm
Posts: 14709
Location: Kent, England
when the unfolded section appears you simply place your cursor in the field somewhere click ctrl/A (cmd/A) or select All from right click, then copy and then paste into a new post to the thread.

Joomla is OS independent - it works on top of the Apache/IIS webserver (with PHP, MySQL et al)


Top
 Profile  
 
PostPosted: Tue May 08, 2012 11:29 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 07, 2012 12:10 pm
Posts: 27
humvee wrote:
when the unfolded section appears you simply place your cursor in the field somewhere click ctrl/A (cmd/A) or select All from right click, then copy and then paste into a new post to the thread.

Joomla is OS independent - it works on top of the Apache/IIS webserver (with PHP, MySQL et al)


Either you don't understand what I mean, or you want me to paste the whole bunch of tables.
According to the FPA manual, I should expect some sorta textarea contain a bunch of information about my system/Joomla-setup. This box, as shown with a picture on the manual ( download/file.php?id=85279&mode=view ) is not appearing in anyway.
I could make up an array of screenshots to show what I am doing, but apparently something is not working. And it's kinda useless to make a screenshot on a perfectly white browser window, which is what I get when I try to run fpa-en.php. Just plain white.

Then I create the expected php-script, which should contain the HTML that should have been sent to the server, and I see some error-messages pass by in my terminal. They start out with mentioning so missing index "act".

As I find a little further in the manual, "act" is a variable send to the script, that could be used to erase fpa-en.php for safety reasons. The box saying so goes to the url fpa-en.php?act=delete which makes this clear. Apparently act should be able to get a few more values, and hence "act" like it. The default is actually not being placed. I'd expect something like
$act = isset($_GET['act']) ? $_GET['act'] : 'some-default-value';
Act stays empty. This may have something to do with the latter errors.
Therefore the script is not displaying anything, as PHP doesn't output anything beyond a fatal error.

The manually created file also doesn't work, as the information box (like stated above) is not showing up...


Top
 Profile  
 
PostPosted: Tue May 08, 2012 5:06 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Wed Aug 17, 2005 10:27 pm
Posts: 14709
Location: Kent, England
OK fine there is clearly an issue with that my apologies for "barking" at you ;)
The fact that MySQL cover shows as no may be that it is protected and therefore stopping FPA from getting an answer.


Top
 Profile  
 
PostPosted: Wed May 09, 2012 9:00 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 07, 2012 12:10 pm
Posts: 27
humvee wrote:
OK fine there is clearly an issue with that my apologies for "barking" at you ;)
The fact that MySQL cover shows as no may be that it is protected and therefore stopping FPA from getting an answer.


No worries. I also felt a little misunderstood. I had hoped I could quickly start to try out Joomla. But I am stuck in a rut. I guess I'd better spend some time on other frameworks. There is something weird in this whole procedure; if I am no longer the boss of my own system, I don't trust things anymore ;-)


Top
 Profile  
 
PostPosted: Wed May 09, 2012 9:22 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Wed Aug 17, 2005 10:27 pm
Posts: 14709
Location: Kent, England
Check out the http://docs.joomla.org/security pages (previously referenced) and attached links they may help resolve your issue - but at the moment without further detail it is difficult to find a solution being so remote from the issue.


Top
 Profile  
 
PostPosted: Wed May 09, 2012 8:52 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 07, 2012 12:10 pm
Posts: 27
humvee wrote:
Check out the http://docs.joomla.org/security pages (previously referenced) and attached links they may help resolve your issue - but at the moment without further detail it is difficult to find a solution being so remote from the issue.


Finally succeeded!!! Here it is

Forum Post Assistant (v1.2.1) : 9th May 2012 wrote:
Basic Environment :: wrote:
Joomla! Instance :: Joomla! 2.5.4-Stable (Ember) 2-April-2012
Joomla! Platform :: Joomla Platform 11.4.0-Stable (Brian Kernighan) 03-Jan-2012
Joomla! Configured :: Yes | Read-Only (664) | Owner: apache (uid: 48/gid: 490) | Group: apache (gid: 490) | Valid For: 1.5
Configuration Options :: Offline: 0 | SEF: 1 | SEF Suffix: 0 | SEF ReWrite: 0 | .htaccess/web.config: No | GZip: 0 | Cache: 0 | FTP Layer: 0 | SSL: N/A | Error Reporting: default | Site Debug: 0 | Language Debug: 0 | Default Access: N/A | Unicode Slugs: N/A | Database Credentials Present: Yes

Host Configuration :: OS: Linux | OS Version: 3.3.4-1.fc16.x86_64 | Technology: x86_64 | Web Server: Apache/2.2.22 (Fedora) | Encoding: gzip, deflate | Doc Root: /var/www/vhosts/ | System TMP Writable: Yes

PHP Configuration :: Version: 5.3.11 | PHP API: apache2handler | Session Path Writable: Unknown | Display Errors: | Error Reporting: 22527 | Log Errors To: | Last Known Error: | Register Globals: | Magic Quotes: | Safe Mode: | Open Base: | Uploads: 1 | Max. Upload Size: 2M | Max. POST Size: 8M | Max. Input Time: 60 | Max. Execution Time: 30 | Memory Limit: 512M

MySQL Configuration :: Version: 5.5.22 (Client:5.5.22) | Host: --protected-- (--protected--) | Collation: utf8_general_ci (Character Set: utf8) | Database Size: 13.00 MiB | #of _FPA_TABLE: 244
Detailed Environment :: wrote:
PHP Extensions :: Core (5.3.11) | date (5.3.11) | ereg () | libxml () | openssl () | pcre () | zlib (1.1) | bz2 () | calendar () | ctype () | hash (1.0) | filter (0.11.0) | ftp () | gettext () | gmp () | SPL (0.2) | iconv () | Reflection ($Id: 522fef1e5100f848a5e2059d98b3a880a3143e9a $) | session () | standard (5.3.11) | shmop () | SimpleXML (0.1) | sockets () | exif (1.4 $Id$) | tokenizer (0.1) | xml () | apache2handler () | curl () | dom (20031129) | fileinfo (1.0.5-dev) | gd () | json (1.2.1) | ldap () | mysqli (0.1) | mysql (1.0) | PDO (1.0.4dev) | pdo_mysql (1.0.2) | pdo_sqlite (1.0.1) | Phar (2.0.1) | posix () | sqlite3 (0.7-dev) | sysvmsg () | sysvsem () | sysvshm () | wddx () | xmlreader (0.1) | xmlwriter (0.1) | xsl (0.1) | zip (1.9.1) | mhash () | xdebug (2.1.4) | Zend Engine (2.3.0) |
Potential Missing Extensions :: mbstring | mcrypt | suhosin |

Switch User Environment (Experimental) :: PHP CGI: No | Server SU: No | PHP SU: No | Custom SU (LiteSpeed/Cloud/Grid): No
Potential Ownership Issues: Maybe

Apache Modules :: core | prefork | http_core | mod_so | mod_auth_basic | mod_auth_digest | mod_authn_file | mod_authn_alias | mod_authn_anon | mod_authn_dbm | mod_authn_default | mod_authz_host | mod_authz_user | mod_authz_owner | mod_authz_groupfile | mod_authz_dbm | mod_authz_default | util_ldap | mod_authnz_ldap | mod_include | mod_log_config | mod_logio | mod_env | mod_ext_filter | mod_mime_magic | mod_expires | mod_deflate | mod_headers | mod_usertrack | mod_setenvif | mod_mime | mod_dav | mod_status | mod_autoindex | mod_info | mod_dav_fs | mod_vhost_alias | mod_negotiation | mod_dir | mod_actions | mod_speling | mod_userdir | mod_alias | mod_rewrite | mod_proxy | mod_proxy_balancer | mod_proxy_ftp | mod_proxy_http | mod_proxy_connect | mod_cache | mod_suexec | mod_disk_cache | mod_dnssd | mod_perl | mod_php5 | mod_python | mod_ssl | Apache/2.2.22 (Fedora) |
Potential Missing Modules :: mod_security | mod_evasive | mod_dosevasive | mod_qos | mod_userdir |
Folder Permissions :: wrote:
Core Folders :: images/ (755) | components/ (755) | modules/ (755) | plugins/ (755) | language/ (755) | templates/ (755) | cache/ (755) | logs/ (755) | tmp/ (755) | administrator/components/ (755) | administrator/modules/ (755) | administrator/language/ (755) | administrator/templates/ (755) |

Elevated Permissions (First 10) :: None
Extensions Discovered :: wrote:
Components :: SITE :: com_wrapper (2.5.0) | com_mailto (2.5.0) |
Components :: ADMIN :: com_modules (2.5.0) | com_search (2.5.0) | com_redirect (2.5.0) | com_checkin (2.5.0) | com_cache (2.5.0) | com_categories (2.5.0) | com_media (2.5.0) | com_content (2.5.0) | com_users (2.5.0) | com_newsfeeds (2.5.0) | com_banners (2.5.0) | com_admin (2.5.0) | com_cpanel (2.5.0) | com_joomlaupdate (2.5.0) | com_finder (2.5.0) | com_installer (2.5.0) | com_messages (2.5.0) | com_plugins (2.5.0) | com_languages (2.5.0) | com_login (2.5.0) | com_menus (2.5.0) | com_config (2.5.0) | com_templates (2.5.0) | com_weblinks (2.5.0) |

Modules :: SITE :: mod_articles_popular (2.5.0) | mod_custom (2.5.0) | mod_stats (2.5.0) | mod_weblinks (2.5.0) | mod_articles_category (2.5.0) | mod_related_items (2.5.0) | mod_login (2.5.0) | mod_wrapper (2.5.0) | mod_finder (2.5.0) | mod_menu (2.5.0) | mod_syndicate (2.5.0) | mod_articles_categories (2.5.0) | mod_articles_latest (2.5.0) | mod_whosonline (2.5.0) | mod_breadcrumbs (2.5.0) | mod_users_latest (2.5.0) | mod_banners (2.5.0) | mod_feed (2.5.0) | mod_random_image (2.5.0) | mod_footer (2.5.0) | mod_languages (2.5.0) | mod_search (2.5.0) | mod_articles_news (2.5.0) | mod_articles_archive (2.5.0) |
Modules :: ADMIN :: mod_custom (2.5.0) | mod_latest (2.5.0) | mod_logged (2.5.0) | mod_status (2.5.0) | mod_login (2.5.0) | mod_menu (2.5.0) | mod_quickicon (2.5.0) | mod_multilangstatus (2.5.0) | mod_title (2.5.0) | mod_feed (2.5.0) | mod_popular (2.5.0) | mod_toolbar (2.5.0) | mod_submenu (2.5.0) | mod_version (2.5.0) |

Plugins :: SITE :: plg_authentication_gmail (2.5.0) | plg_authentication_ldap (2.5.0) | plg_authentication_joomla (2.5.0) | plg_search_newsfeeds (2.5.0) | plg_search_categories (2.5.0) | plg_search_content (2.5.0) | plg_search_contacts (2.5.0) | plg_search_weblinks (2.5.0) | plg_finder_newsfeeds (2.5.0) | plg_finder_categories (2.5.0) | plg_finder_content (2.5.0) | plg_finder_contacts (2.5.0) | plg_finder_weblinks (2.5.0) | plg_editors_codemirror (1.0) | plg_editors_tinymce (3.4.9) | plg_extension_joomla (2.5.0) | plg_editors-xtd_readmore (2.5.0) | plg_editors-xtd_article (2.5.0) | plg_editors-xtd_image (2.5.0) | plg_editors-xtd_pagebreak (2.5.0) | plg_content_finder (2.5.0) | plg_content_vote (2.5.0) | plg_content_geshi (2.5.0) | plg_content_emailcloak (2.5.0) | plg_content_loadmodule (2.5.0) | plg_content_pagenavigation (2.5.0) | plg_content_joomla (2.5.0) | plg_content_pagebreak (2.5.0) | plg_captcha_recaptcha (2.5.0) | plg_quickicon_extensionupdate (2.5.0) | plg_quickicon_joomlaupdate (2.5.0) | plg_user_contactcreator (2.5.0) | plg_user_profile (2.5.0) | plg_user_joomla (2.5.0) | plg_system_log (2.5.0) | plg_system_redirect (2.5.0) | plg_system_remember (2.5.0) | plg_system_highlight (2.5.0) | plg_system_debug (2.5.0) | plg_system_cache (2.5.0) | plg_system_languagecode (2.5.0) | plg_system_sef (2.5.0) | plg_system_logout (2.5.0) | plg_system_p3p (2.5.0) | plg_system_languagefilter (2.5.0) |
Templates Discovered :: wrote:
Templates :: SITE :: beez5 (2.5.0) | atomic (2.5.0) | beez_20 (2.5.0) |
Templates :: ADMIN :: hathor (2.5.0) | bluestork (2.5.0) |


Top
 Profile  
 
PostPosted: Wed May 09, 2012 9:34 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Wed Aug 17, 2005 10:27 pm
Posts: 14709
Location: Kent, England
For future reference and to help others what was the cause of the problem you found?

Please pay attention to the potential missing extensions, or at least double check that they are enabled. In particular mcrypt and mbstring for PHP and that these are properly configured

Also the missing Apache modules including and in particular mod_security and that these are properly configured

I would also point out, although unlikely to be a contributor to this issue, that configuration.php ideally wants to be set to 644 and not 664 as it is currently.


Top
 Profile  
 
PostPosted: Wed May 09, 2012 10:53 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 07, 2012 12:10 pm
Posts: 27
humvee wrote:
For future reference and to help others what was the cause of the problem you found?


I removed the entire installation and installed again clean. This time FPA ran w/out problems. I guess that fiddling around with the ownership and permissions was the meany. Eventho I resetted those settings to the approx original settings, there was still something not working.
Reinstalling was the key.

humvee wrote:
Please pay attention to the potential missing extensions, or at least double check that they are enabled. In particular mcrypt and mbstring for PHP and that these are properly configured

Also the missing Apache modules including and in particular mod_security and that these are properly configured

I would also point out, although unlikely to be a contributor to this issue, that configuration.php ideally wants to be set to 644 and not 664 as it is currently.


Installed most of the missing PHP extentions and modules. It changed nothing about the writability tho. :-(
Do some more reading on the other modules, but I need a good nights sleep first now :-)

Thanks so far


Top
 Profile  
 
PostPosted: Thu May 10, 2012 8:00 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Wed Aug 17, 2005 10:27 pm
Posts: 14709
Location: Kent, England
Do you have the FTP layer configured and running - check the Global Configuration. This may well overcome the issues if properly configured.

As server is using Apache 2 Handler this means Apache is the owner, whereas you as the Joomla! administrator are not "Apache".


Top
 Profile  
 
PostPosted: Thu May 10, 2012 9:11 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 07, 2012 12:10 pm
Posts: 27
humvee wrote:
Do you have the FTP layer configured and running - check the Global Configuration. This may well overcome the issues if properly configured.

As server is using Apache 2 Handler this means Apache is the owner, whereas you as the Joomla! administrator are not "Apache".


I reinstalled the whole package through FTP. (I have a virtual Win XP from which I FTP'd the package to my server). This was done as "opapunk", my local username, so everything stayed the same; this user is owner.

Also I installed the FTP layer during the process, with the same username.

Or did I have to do this as the user "Apache"? (I wouldn't know what password to user, and frankly, I don't think this *should* be possible).

Anyway, I didn't touch anything else. The same problem still exists: no permissions to write to the necessary files and dirs at all.


Top
 Profile  
 
PostPosted: Thu May 10, 2012 11:57 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 07, 2012 12:10 pm
Posts: 27
It took me a while, but I think I am a fair bit closer to the solution. I also don't know how system specific this is, but here's what I did...

It mostly had to do with SELINUX.

In order to get the files writable, I NEEDED to
1) make "apache" the group-owner
2) give the group write-permission (maybe I could have made apache user-owner, but I want my user to still be able to read/write the files).
3) In Gnome you can change the SELINUX settings easily by a dropdownmenu in the permissions tab of the file. (you can also do it at the CL with some setsebool -P commands, but this was easier and faster).
The option you needed to choose was "httpd_user_rw_content_t".

Having changed all 3 of the above rendered my files/dirs writable.

Now I go on and try to install a theme... Keep my fingers crossed.

well, that went well as well... But I wonder how secure this is.


Top
 Profile  
 
PostPosted: Thu May 10, 2012 4:38 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Wed Aug 17, 2005 10:27 pm
Posts: 14709
Location: Kent, England
I have tried to contact one of my friends who is more up to speed with these issues and asked him to take a look at the thread so hopefully later today (he's in a different time zone to me so it might not be for a few hours yet.


Top
 Profile  
 
PostPosted: Thu May 10, 2012 8:47 pm 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Sun Oct 22, 2006 4:42 am
Posts: 9352
Location: Sunshine Coast, Queensland, Australia
You have several choices here;

1) seeing as this is a dev/test box, simply disable SELinux
2) Configure SELinux security context for the HTTPd and PHP to allow them to write to the required directories.

SELinux can be a little confusing at times, so some research will be required to set the context's correctly ...

Example of Apache/SELinux context
Code:
root@host# which httpd
/usr/sbin/httpd

root@host# ls -Z /usr/sbin/httpd
-rwxr-xr-x root root system_u:object_r:httpd_exec_t /usr/sbin/httpd


It would appear that SELinux is stopping writes in memory, which is not uncommon as by default it is not expected behaviour to allow other users or non-system processes to write to non-owned directories. This overrides system ownership and mode models at the process level before it even gets to the file-system.

_________________
Joomla! on the fabulous Sunshine Coast...
hotmango, web & print http://www.hotmango.me/
Network SMARTS, Systems Engineering http://www.networksmarts.com.au/


Top
 Profile  
 
PostPosted: Fri May 11, 2012 9:54 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 07, 2012 12:10 pm
Posts: 27
RussW wrote:
You have several choices here;

1) seeing as this is a dev/test box, simply disable SELinux
2) Configure SELinux security context for the HTTPd and PHP to allow them to write to the required directories.

SELinux can be a little confusing at times, so some research will be required to set the context's correctly ...

Example of Apache/SELinux context
Code:
root@host# which httpd
/usr/sbin/httpd

root@host# ls -Z /usr/sbin/httpd
-rwxr-xr-x root root system_u:object_r:httpd_exec_t /usr/sbin/httpd


It would appear that SELinux is stopping writes in memory, which is not uncommon as by default it is not expected behaviour to allow other users or non-system processes to write to non-owned directories. This overrides system ownership and mode models at the process level before it even gets to the file-system.


Hi Russ, thanks...

I figured it had something to do with SEL, but -like you said- this whole thing is kinda cryptic, eventho I can figure out what it means.
What makes me wonder is if this isn't a security risk? I Mean, SEL wasn't protecting the files for no reason, I'd assume. What does it mean for the outside world if you are too liberal with those rights? I am a coder and not a sysop...

So far I never experienced any problems whatsoever in my self-made code. I have been coding in Perl and PHP for a mighty long time and never had to change any rights, apart from the dirs where you could upload images. And those uploads were then (as good as possible) checked. Furthermore I didn't change any rights.

Now with Joomla I needed to make all sorts of directories writable and give all sorts of access I don't trust. I hope I am not being too naive.

And also another problem popped up... I keep getting the message Forbidden when I try to create an article.
"You don't have permission to access /administrator/index.php on this server."

I changed the rights, ownership and SELinux settings in all sorts of ways, but it doesn't make any difference.

In what world have I landed starting this? The idea was to speed things up with Joomla ;-)


Top
 Profile  
 
PostPosted: Fri May 11, 2012 11:29 am 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Sun Oct 22, 2006 4:42 am
Posts: 9352
Location: Sunshine Coast, Queensland, Australia
is this a localhost or production system? If a localhost then just disable SELinux, if it's a production host, get a professional Admin to set it up for you correctly, so it doesn't interfere with PHP. This is not an uncommon occurnce, especially with new OS installs as SELinux comes out of the box not allowing executable scripting nor non-owner execution of binaries outside of the systems control.

_________________
Joomla! on the fabulous Sunshine Coast...
hotmango, web & print http://www.hotmango.me/
Network SMARTS, Systems Engineering http://www.networksmarts.com.au/


Top
 Profile  
 
PostPosted: Fri May 11, 2012 11:43 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 07, 2012 12:10 pm
Posts: 27
RussW wrote:
is this a localhost or production system? If a localhost then just disable SELinux, if it's a production host, get a professional Admin to set it up for you correctly, so it doesn't interfere with PHP. This is not an uncommon occurnce, especially with new OS installs as SELinux comes out of the box not allowing executable scripting nor non-owner execution of binaries outside of the systems control.


Well the machine I am currently installing Joomla on is localhost. But it *is* reachable from outside cos I work together with a designer who wants to be able to watch the progression.

But how about the index.php which is inaccessible? Even after setting the permissions to 777 and the group to apache (which should be unnecessary when I give r,w and x to the world), and I set the SEL settings to e.g. httpd_user_script_exec_t OR httpd_user_content_ra_t or ...rw_t... Neither of these setting make to Forbidden error go away. *ponder ponder*

TIA


Top
 Profile  
 
PostPosted: Fri May 11, 2012 12:23 pm 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Sun Oct 22, 2006 4:42 am
Posts: 9352
Location: Sunshine Coast, Queensland, Australia
Did I miss something? What about the index.php?

_________________
Joomla! on the fabulous Sunshine Coast...
hotmango, web & print http://www.hotmango.me/
Network SMARTS, Systems Engineering http://www.networksmarts.com.au/


Top
 Profile  
 
PostPosted: Fri May 11, 2012 1:51 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 07, 2012 12:10 pm
Posts: 27
RussW wrote:
Did I miss something? What about the index.php?


This is what I wrote
Quote:
And also another problem popped up... I keep getting the message Forbidden when I try to create an article.
"You don't have permission to access /administrator/index.php on this server."

I changed the rights, ownership and SELinux settings in all sorts of ways, but it doesn't make any difference.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 46 posts ]  Go to page 1, 2  Next



Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group