1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Suddenly I can't administrate

Discussion in 'Troubleshooting and Problems' started by Mr Lucky, Dec 1, 2013.

  1. Mr Lucky

    Mr Lucky Well-Known Member

    I get into the admin control panel, but when I try to change a user's group I get this:

    The following error occurred:

    You don't have permission to access /community/admin.php on this server.

    help!!! please
  2. Mr Lucky

    Mr Lucky Well-Known Member


    This is really serious - none of my admins can change a user's group - they all get the same error
  3. Jeremy

    Jeremy Well-Known Member

    You've changed the file permissions on admin.php. Change it back so it is 0644 I believe.
  4. Mr Lucky

    Mr Lucky Well-Known Member

    No I didn't change any permissions, it's still at 644

    EDIT: I can do other things in admin, e.g. change the name of a usergroup or changea usergroup permissions

    BUT the big problem is changing/adding a group for a user
    Last edited: Dec 1, 2013
  5. Liam W

    Liam W Well-Known Member

    Check the apache error log, what does it say?
  6. Mr Lucky

    Mr Lucky Well-Known Member

    What's an apache error log please?
  7. Mr Lucky

    Mr Lucky Well-Known Member

    I've raised a support ticket now is this is very serious, possibly disastrous as we can't properly moderate users.
  8. Mr Lucky

    Mr Lucky Well-Known Member

    Ok, I seem to have fixed it by changing admin.php from644 to 744

    I'm not sure if that is a good idea though so changed it back to 644 after changing the usergroup for the user
  9. Jeremy

    Jeremy Well-Known Member

    The problem isn't with the software and with the server itself. It sounds like you may have some mod_security settings or something server side that is sending a forbidden error.
    Wuebit and Adam Howard like this.
  10. Mike

    Mike XenForo Developer Staff Member

    I responded to your ticket, but Jeremy is correct -- this is almost certainly caused by some system on your server. It's very unlikely XenForo's code is even being run before this was triggered.

    (Though I wasn't able to reproduce the issue when I tested.)
  11. Mr Lucky

    Mr Lucky Well-Known Member

    This is something that was OK before and just started recently. Nothing changed on the server.

    I changed the permissions from 644 to 744 and the problem seemed to be solved.
  12. Mr Lucky

    Mr Lucky Well-Known Member

    probably because it was after i changed the admin.php from 644 to 744
  13. Liam W

    Liam W Well-Known Member

    Are you sure nothing was changed on the server? Is it shared hosting?

    Does it have a control panel?

  14. Adam Howard

    Adam Howard Well-Known Member

    If it was working on 744 .... Something changed.

    That's not a usual (common) setting for a php file to need to execute. And as you said, it was working before.
  15. Mr Lucky

    Mr Lucky Well-Known Member

    The only thing I can think of is I installed the add-on NRE - New Registration Email. Could that have caused this?
  16. Ernest L. Defoe

    Ernest L. Defoe Well-Known Member

    It's highly unlikely that and add-on changed file permissions. Your host must have updated something recently or they installed something recently that caused this to happen.
    Adam Howard likes this.
  17. Mr Lucky

    Mr Lucky Well-Known Member

    No, nothing actually changed the file permissions. (Apart from me doing it manually when testing)

    I checked the permissions as advised by Jeremy and found it to be still at 644, as installed. When I changed it to 744 I was again able to access the admin page for changing usergroups. Note that all along I had been able to access other admin pages, just not the one where you change a user's group.

    So I changed it to 744 to see what would happen and found that suddenly it worked again.
  18. Tracy Perry

    Tracy Perry Well-Known Member

    Check the ownership/group of it.
    Adam Howard likes this.
  19. Mr Lucky

    Mr Lucky Well-Known Member

    To what?

    Both are set to the username of the cpanel.

    What I find weird is that I change it back to 644, and now it also works.

    So it goes like this

    • Originally after installing it worked fine
    • Suddenly this weekend we get the Forbidden error
    • Check admin.php permissions following Jeremy's post above and find they are correct (=644)
    • Change admin.php to permission 744
    • Able to edit user again
    • Change back to 644
    • Still no problem
    I spoke to the host, Zen Internet, who were not aware of any change to mod_security over the weekend, but offered to invsitiagte if I can replicate the issue, which at the moment i can't as it's all working fine after changing for 644 to 744 and back to 644.

    Seems very strange to me.
  20. Tracy Perry

    Tracy Perry Well-Known Member

    To what the other related files would be. Make sure that they all have the same ownership.

    Sound like something on the server end.... and they just "forgot" what it was but fixed it.
    I don't use mod_security but if they had it to restrictive it could have caused problems.
    Adam Howard likes this.

Share This Page