Advertisement:

Author Topic: Can't update to 2.0.7 - suspect file permission issues  (Read 4052 times)

Offline snarfblat

  • Semi-Newbie
  • *
  • Posts: 13
Can't update to 2.0.7 - suspect file permission issues
« on: June 05, 2014, 09:36:31 AM »
Note - We use an in-house server with RedHat Linux.

Yesterday I updated from 1.1.14 through to 1.1.19 and then upgraded to 2.0.6.  That all went well after dealing with the 1.1.16 update and then manually upgrading to 2.0.6.  I am now trying to use Package Manager to update to 2.0.7 and it won't let me.  When I use Browse Packages and try to install 2.0.7 it says that some file permissions need to be changed.  I have tried using the FTP stuff at the bottom there, using both the forum admin ID and get 530 Login Incorrect or the server root ID and get 530 Permission Denied.

Next, I tried the File Permissions "tab" and can see that the folder "Cache" is not writable.  I selected Custom for that folder and tried to change the setting using the logon info below, both the forum admin and root.  That does not provide any errors, but does not change the status.  I have also tried using the "Use predefined permissions profile", and that did not work either.

Using another tool, I looked at the folders on the server for SMF.  I found that all of the permission settings on all of the SMF folders are the same - 755.  The difference is that the Owner and Group of all of the folders for SMF are Apache, with the exception of Cache, which is root for both.

So, is that the issue?  Do I need to change the owner and group of the Cache folder to be Apache to match the rest?  If so, can you tell me the easiest way to do that.

kat

  • Guest
Re: Can't update to 2.0.7 - suspect file permission issues
« Reply #1 on: June 05, 2014, 09:52:48 AM »
First off, check the version of PHP that you're using. If it's not up to v5.5, stick with v2.0.6. :)

Offline snarfblat

  • Semi-Newbie
  • *
  • Posts: 13
Re: Can't update to 2.0.7 - suspect file permission issues
« Reply #2 on: June 05, 2014, 09:56:35 AM »
PHP is at 5.3.2 - so stick where I am then?  Aside from that, is the Cache folder supposed to have the same owner/group as the other folders in/ SMF?

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: Can't update to 2.0.7 - suspect file permission issues
« Reply #3 on: June 05, 2014, 09:59:33 AM »
Yes, it should. And it is likely that other files/folder have ownership issues, according your description.

Also, the owner should be the user that runs that account (if you have multiple accounts in Apache), not root.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline snarfblat

  • Semi-Newbie
  • *
  • Posts: 13
Re: Can't update to 2.0.7 - suspect file permission issues
« Reply #4 on: June 05, 2014, 10:21:45 AM »
Aside from the update to 2.0.7, which I will now hold off on till I upgrade PHP, etc.  Would the desired state be that all of the contents (i.e. files/folders) in SMF have the same owner and group?  In looking, I did find a mix of ownership, mostly the Apache, but some of root.  I am assuming here that this happened when I did the manual upgrade to 2.0.6 and FTP'ed the package to the server.  Does this sound right?  So I'd be better off correcting ownership to Apache for all?

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: Can't update to 2.0.7 - suspect file permission issues
« Reply #5 on: June 05, 2014, 10:26:50 AM »
Yes, that's most likely the cause ;)

And for safety, you can also leave everything with 644, except "cache". When you need to install something, then you can put what's needed at 755 and then return to 644. It's one of the best ways to protect your server. Even if your forum account gets compromised, the attacker will not be able to change any files from SMF.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline snarfblat

  • Semi-Newbie
  • *
  • Posts: 13
Re: Can't update to 2.0.7 - suspect file permission issues
« Reply #6 on: June 05, 2014, 10:36:40 AM »
Thank you very much!  I will work on making those changes.

Offline snarfblat

  • Semi-Newbie
  • *
  • Posts: 13
Re: Can't update to 2.0.7 - suspect file permission issues
« Reply #7 on: June 05, 2014, 11:32:53 AM »
FYI - I used the File Permissions tab/utility in Package Manager to change all folder other than Cache to 644 as you suggested and I then couldn't get back into the forum.  Cache was left at 755.  I was issued an error stating I didn't have permissions any longer.  I corrected by issuing a chmod back to 755 for the entire SMF structure and got back in... did I do something wrong?

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: Can't update to 2.0.7 - suspect file permission issues
« Reply #8 on: June 05, 2014, 11:39:53 AM »
Not really, no. I had that experience myself once so I never used that tool again :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair