Results 1 to 2 of 2
  1. #1

    Problem installing apache (debian)

    Hi guys,

    First post in this forum!

    I'm getting a permission error message from php while trying to open a file, I just installed apache2 on debian.

    I added a user to debian and in his home directory I created a www folder, then I edited /etc/apache2/sites-available/default and set DocumentRoot to point to /home/user/www

    I uploaded my php files using FTP and they are all owned by that user that I created.

    I'm "getting a failed to open stream permission denied error", when I'm navigating to a php file that tries to create a file in /www/logs/ (the logs folder is also owned by the user).

    I thought suexec will fix this but it didn't... I installed and enabled suexec, then added the SuexecUserGroup directive under <VirtualHost>

    Any idea what's wrong?

    By the way, running the php script from command line when I'm ssh login with that user is working!

  2. #2
    Join Date
    Jul 2009
    try to change the permission of the logs directory to 777, as the php script is writing a file that means apache user is writing the file because php scripts run under apache user if suexec is not enabled.

    the php script is running correctly on shell because from shell it runs under root user which can write any file any where.
    ServerManagementAdmins -- Expert in Server Management, Server Hardening & Server Optimization.
    Server Management Company
    IM (skype): servermanagementadmins Email: sales[at]servermanagementadmins[dot]com

Similar Threads

  1. Problem installing SSL cert with APACHE 2
    By Bazuuka in forum Dedicated Server
    Replies: 1
    Last Post: 03-14-2007, 11:25 PM
  2. Help installing SSL on Debian Server
    By devilslayer in forum Hosting Security and Technology
    Replies: 2
    Last Post: 02-05-2006, 10:00 AM
  3. Installing MRTG on Debian
    By ewhost in forum Hosting Security and Technology
    Replies: 5
    Last Post: 07-27-2005, 08:37 AM
  4. apt get problem with sw-soft sitebuilder on debian with apache 1.3
    By Doithosting in forum Hosting Software and Control Panels
    Replies: 0
    Last Post: 05-16-2005, 03:09 AM
  5. manualy installing cpanel on Debian/Redhat
    By e-view in forum Hosting Software and Control Panels
    Replies: 3
    Last Post: 09-12-2004, 07:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts