XF 2.1 Files not writable

CarpCharacin

Well-known member
I tried to upgrade to XF 2.1.1 one click, but the files aren't writable. What are the directories that need to be writable?upgrade.webp
 
Hehe , just typed this on another thread :)


Ok , so I saw this when I had
nginx as the php owner. IE the user the was running the php ( the site code if you like )
uploader was the owner of the folder /src etc etc.

nginx cant get to do the update as it doesnt "own" the folder so hasnt the permission. I had to change the owner of the folder /src from uploader to nginx.

I found out what "user" was running the php with some simple php code and ran it via my webserver address

I created a file on my site called whoami.php
I put in the below text
Code:
<?php
  passthru("whoami");
?>
Saved it

went to chrome and opened up turborenault.co.uk/whoami.php - you put in your own domain

It told me that nginx was running the php so I used chown via putty to change the owner.
 
Sorted thanks (y)


Mine was a different procedure as our file server is using Windows Server 2012 but basically using andybond's code above...

<?php
passthru("whoami");
?>

Gave me the iisapppool name that php was owned by

Then right-clicking the 'forums' directory, selecting 'Edit permissions' followed by 'Security' followed by 'Edit' then 'Add'
Enter the full results of the file above into the field 'Enter the object names to select', click 'Ok'
(ie: iis apppool\yoursitepool)
Ignore the message at the top of the next window and click 'Ok' again

You'll now be returned back to the 'Security' window and in there set the permissions for the user eg 'yoursitepool'

Click 'Ok' and 'Ok' to close all windows.
 
For anyone using Scotchbox, the recommended local development environment for XenForo, you will run into the permissions issue if you attempt to use the one-click upgrade feature. Fortunately, this is an easy fix. Just follow these instructions (the part near the bottom):


Specifically:

Change Apache runs as user/group "vagrant" instead of "www-data":
Code:
export APACHE_RUN_USER=vagrant
export APACHE_RUN_GROUP=vagrant

Then restart (not reload) Apache:

Code:
sudo service apache2 restart
 
Sorry to bump an old thread.

A few weeks ago I updated PHP and MairaDB. I then had to cmod Data and Internal Data.
However trying to automatically do the new update I get the "Files are not writeable" error.

I created the whoami.php and it comes back with apache.

I think tried this as mentioned on another thread:

Run
chown -R user:user /path/to/data
and
chown -R user:user /path/to/internal_data

However it comes back as "
chown: invalid user: ‘user:user’

On Filezilla it shows Owner/Group as:
davel davel

However if I try chown -R user:davel /path/to/data it still comes back as invalid user.

In my xenforo configuarion it says "
User/Group apache(995)/995


I've also seen in my VPS apache settings, Enable suPHP - Would I need to enable that?
 
Last edited:
chown -R user:davel /path/to/data
Is that exactly what you're typing? The format for the user parameter is "USER:GROUP", so your command is telling it that you want to change the ownership to a user named "user" in the system's user group called "davel". You've got a "davel" usergroup (as shown by Filezilla), but there's not a user named "user". See here for more info.

Try this instead:

Code:
chown -R davel:davel /path/to/data
 
Is that exactly what you're typing? The format for the user parameter is "USER:GROUP", so your command is telling it that you want to change the ownership to a user named "user" in the system's user group called "davel". You've got a "davel" usergroup (as shown by Filezilla), but there's not a user named "user". See here for more info.

Try this instead:

Code:
chown -R davel:davel /path/to/data
Many thanks for your reply. That makes a lot of sense! I manually upgraded, so have no way to test at present, however I did use the above command and it came back with no errors, so fingers crossed!
Will come back and update when I can test with the next update in the ACP!
 
Top Bottom