SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 39 of 39

Thread: PHP on Linux

  1. #26
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    jan1024188
    the Apache error_log contents would be extremely helpful.

  2. #27
    SitePoint Zealot
    Join Date
    Feb 2010
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is the only error in the virtual server log:
    [Sat Mar 06 10:08:00 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /403.html denied
    [Sat Mar 06 10:08:00 2010] [error] [client 127.0.0.1] (13)Permission denied: access to / denied
    [Sat Mar 06 10:08:00 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /403.html denied
    [Sat Mar 06 10:08:00 2010] [error] [client 127.0.0.1] (13)Permission denied: access to / denied
    [Sat Mar 06 10:08:00 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /403.html denied
    [Sat Mar 06 10:08:00 2010] [error] [client 127.0.0.1] (13)Permission denied: access to / denied
    [Sat Mar 06 10:08:00 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /403.html denied

  3. #28
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    argh I was wrong
    thought it would have a full pathname.

    well you have to check if your DocumentRoot properly set and Apacha user (not you) have execute access to each folder in it's path and read access to the very last folder

  4. #29
    SitePoint Zealot
    Join Date
    Feb 2010
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Shrapnel_N5 View Post
    argh I was wrong
    thought it would have a full pathname.

    well you have to check if your DocumentRoot properly set and Apacha user (not you) have execute access to each folder in it's path and read access to the very last folder
    Who is apache user? root?
    I guess root has access everywhere.

  5. #30
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    user named 'www' probably

  6. #31
    SitePoint Zealot
    Join Date
    Feb 2010
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I don't understand. How do I assign proper permissions?

  7. #32
    SitePoint Zealot
    Join Date
    Feb 2010
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how do I set permissions to that user?

  8. #33
    SitePoint Addict
    Join Date
    Apr 2009
    Posts
    248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Suggestions:

    1. Tone down the anti-Windows rhetoric. It makes you sound immature.

    2. If your heart is set on Linux, find someone who actually has experience, and pay them to admin the box for you. This isn't a Linux support forum, it's a PHP forum. Your issues have nothing to do with PHP, it has to do with your own inexperience on the platform. It's not fair to ask people you've never met to not only help you troubleshoot a relatively simple problem (which is legitimate), but to also educate you on very simple Linux related commands which can trivially be learned with a simple google search (or man page usage). Don't take the goodwill of strangers for granted, else it will disappear when you most need it.

  9. #34
    SitePoint Zealot
    Join Date
    Feb 2010
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SituationSoap View Post
    Suggestions:

    1. Tone down the anti-Windows rhetoric. It makes you sound immature.

    2. If your heart is set on Linux, find someone who actually has experience, and pay them to admin the box for you. This isn't a Linux support forum, it's a PHP forum. Your issues have nothing to do with PHP, it has to do with your own inexperience on the platform. It's not fair to ask people you've never met to not only help you troubleshoot a relatively simple problem (which is legitimate), but to also educate you on very simple Linux related commands which can trivially be learned with a simple google search (or man page usage). Don't take the goodwill of strangers for granted, else it will disappear when you most need it.
    yeah, this totally solved all my issues!

  10. #35
    SitePoint Wizard
    Join Date
    Nov 2005
    Posts
    1,191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The user will depend on your system, eg mine is www-data
    Here's some info on linux permissions

  11. #36
    SitePoint Zealot
    Join Date
    Feb 2010
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But I don't understand, I did chmod 775 and its still forbidden.

  12. #37
    SitePoint Guru mmarif4u's Avatar
    Join Date
    Dec 2006
    Location
    /dev/swat
    Posts
    619
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try these suggestions:

    Open terminal and type:
    Code:
    su -
    Enter root password

    Now to chmod that www dir OR own by a user use these:
    1st try this,
    Code:
    root@yyy2-desktop:~# chown username /var/www/html
    Change username in above command.

    If that does not work, mean still forbid error.
    2nd option:
    Code:
    root@yyy2-desktop:~# chmod 777 -R /var/www/html
    This one i am pretty sure will work.

    Good luck.

  13. #38
    SitePoint Zealot
    Join Date
    Feb 2010
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did all this:
    [root@localhost ~]# chown jan1024188 -R /home/jan1024188/public_html/
    [root@localhost ~]# chmod 777 -R /home/jan1024188/public_html/
    [root@localhost ~]# chown apache -R /home/jan1024188/public_html/
    [root@localhost ~]# chown apache:apache -R /home/jan1024188/public_html/
    I have index.html specified as directory index, I have set proper permissions in httpd.conf, I really can't find the issue.

    EDIT:
    Here's what says in Apache manual about forbidden:
    In the case where file system permission are at fault, remember that not only must the directory and files in question be readable, but also all parent directories must be at least searchable (i.e., chmod +x /directory/path) by the web server in order for the content to be accessible.
    So I tried:
    [root@localhost ~]# chown apache -R /home/jan1024188/
    chown: cannot access `/home/jan1024188/.gvfs': Permission denied
    [root@localhost ~]# chown apache -R /home/
    chown: cannot access `/home/jan1024188/.gvfs': Permission denied
    [root@localhost ~]# chmod 777 -R /home/jan1024188/
    chmod: cannot access `/home/jan1024188/.gvfs': Permission denied
    [root@localhost ~]# chmod 777 -R /home/
    chmod: cannot access `/home/jan1024188/.gvfs': Permission denied
    [root@localhost ~]#
    My guess is this is the issue!

    So I did:
    [root@localhost ~]# chmod +x /home/
    [root@localhost ~]# chmod +x /home/jan1024188/
    AND NOW IT WORKS. Thanks a TON you guys for help Love you

  14. #39
    SitePoint Guru mmarif4u's Avatar
    Join Date
    Dec 2006
    Location
    /dev/swat
    Posts
    619
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Glad to hear you solved it.


Bookmarks

Posting Permissions

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