Permissions errors on first use of /_admin screen

I have been able to install things fine, was able to see the root of my site, and tried to log in to the "domain.com/matrix/_admin" screen…


and saw this.

    Warning: fopen(/applications/web/matrix/data/private/logs/error.log): failed to open stream: Permission denied in /applications/web/matrix/core/include/general.inc on line 850
    
    Warning: fwrite(): supplied argument is not a valid stream resource in /applications/web/matrix/core/include/general.inc on line 851
    
    Warning: Unable to Write to log file /applications/web/matrix/data/private/logs/error.log [SYS0051] in /applications/web/matrix/core/include/locale_manager.inc on line 512
    
    PHP Warning
    session_start(): open([SYSTEM_ROOT]/cache/sess_2347b567ac19b6311324d0a6706d84cb, O_RDWR) failed: Permission denied (13)
    
    
    Warning: fopen(/applications/web/matrix/data/private/logs/error.log): failed to open stream: Permission denied in /applications/web/matrix/core/include/general.inc on line 850
    
    Warning: fwrite(): supplied argument is not a valid stream resource in /applications/web/matrix/core/include/general.inc on line 851
    
    Warning: Unable to Write to log file /applications/web/matrix/data/private/logs/error.log [SYS0051] in /applications/web/matrix/core/include/locale_manager.inc on line 512
    
    PHP Warning
    session_start(): Cannot send session cookie - headers already sent by (output started at [SYSTEM_ROOT]/core/include/general.inc:850)
    
    
    Warning: fopen(/applications/web/matrix/data/private/logs/error.log): failed to open stream: Permission denied in /applications/web/matrix/core/include/general.inc on line 850
    
    Warning: fwrite(): supplied argument is not a valid stream resource in /applications/web/matrix/core/include/general.inc on line 851
    
    Warning: Unable to Write to log file /applications/web/matrix/data/private/logs/error.log [SYS0051] in /applications/web/matrix/core/include/locale_manager.inc on line 512
    
    PHP Warning
    session_start(): Cannot send session cache limiter - headers already sent (output started at [SYSTEM_ROOT]/core/include/general.inc:850)
    
    
    Warning: fopen(/applications/web/matrix/data/private/logs/error.log): failed to open stream: Permission denied in /applications/web/matrix/core/include/general.inc on line 850
    
    Warning: fwrite(): supplied argument is not a valid stream resource in /applications/web/matrix/core/include/general.inc on line 851
    
    Warning: Unable to Write to log file /applications/web/matrix/data/private/logs/error.log [SYS0051] in /applications/web/matrix/core/include/locale_manager.inc on line 512
    
    PHP Warning
    Cannot modify header information - headers already sent by (output started at [SYSTEM_ROOT]/core/include/general.inc:850)
    
    
    Warning: fopen(/applications/web/matrix/data/private/logs/error.log): failed to open stream: Permission denied in /applications/web/matrix/core/include/general.inc on line 850
    
    Warning: fwrite(): supplied argument is not a valid stream resource in /applications/web/matrix/core/include/general.inc on line 851
    
    Warning: Unable to Write to log file /applications/web/matrix/data/private/logs/error.log [SYS0051] in /applications/web/matrix/core/include/locale_manager.inc on line 512
    
    PHP Warning
    Cannot modify header information - headers already sent by (output started at [SYSTEM_ROOT]/core/include/general.inc:850)
    
    Login
    
    Currently Logged in as
    
    You need to login before you can access the backend
    Username:  
    Password:  
    
    Warning: fopen(/applications/web/matrix/data/private/logs/error.log): failed to open stream: Permission denied in /applications/web/matrix/core/include/general.inc on line 850
    
    Warning: fwrite(): supplied argument is not a valid stream resource in /applications/web/matrix/core/include/general.inc on line 851
    
    Warning: Unable to Write to log file /applications/web/matrix/data/private/logs/error.log [SYS0051] in /applications/web/matrix/core/include/locale_manager.inc on line 512
    
    PHP Warning
    Unknown(): open(/applications/web/matrix/cache/sess_2347b567ac19b6311324d0a6706d84cb, O_RDWR) failed: Permission denied (13)
    
    
    Warning: fopen(/applications/web/matrix/data/private/logs/error.log): failed to open stream: Permission denied in /applications/web/matrix/core/include/general.inc on line 850
    
    Warning: fwrite(): supplied argument is not a valid stream resource in /applications/web/matrix/core/include/general.inc on line 851
    
    Warning: Unable to Write to log file /applications/web/matrix/data/private/logs/error.log [SYS0051] in /applications/web/matrix/core/include/locale_manager.inc on line 512
    
    PHP Warning
    Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/applications/web/matrix/cache)


Obviously there are permission errors.
I un-tarred the install as root on my system
and I've changed "data" and "cache" to be owned by apache:apache as the instructions dictate...

Thoughts?
Thank you.

Apache still cant write to /applications/web/matrix/data/private/logs/error.log


Can you check the permissions of that file to make sure the owner has write access.

It happened to me a few times.
The log files seem to be created very late in the install procedure by the user running the install.

I usually run the change of ownership on data/ and cache/ after step03 as well as before step01.



Edited: changed 'after' to 'before'.

I run this:

    # chown -R apache:apache *
    # find -type d | xargs chmod 2775
    # find -type f | xargs chmod 664


I do this after the last compile_locales.php during the installation process. The 2775 set setguid on the directories so that any new files/directories created will be owned by apache too.

Glad I'm not alone.
Avi, I assume thats in the /applications/web/matrix/ directory (in my case).

I'll give that a shot.



Thanks!

    [root@portaldev logs]# ls -l
    total 76
    drwxrwsr-x    2 apache   apache       4096 Mar  6 01:17 CVS
    -rw-rw-r--    1 apache   apache       2906 Mar 29 15:23 error.log
    -rw-rw-r--    1 apache   apache      65457 Mar 29 15:27 system.log
    [root@portaldev logs]#


I ran the commands that Avi suggested, restarted apache, and I'm seeing the same errors.

Any other thoughts?

Are you sure that Apache is running as the "apache" user? Essentially, those files must be writable by the Apache/PHP process.

I went through all of this process after starting over with a clean install.
It's now generating a NEW error as documented in the new forum post I've made.



yes, the entire directory is set for apache:apache usage.

I even tried nobody:nobody as well just to see… same problem.



I've found someone who I can talk to face to face who's installed mysource, so I'm going to track him down, but any other advice is appreciated.



Thank you.

Check your php.ini settings, particularly safe_mode and open_basedir restrictions – perhaps PHP itself is preventing you from writing to those locations?