Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
4.7.0 beta 2 Theme file permissions
I’ve been testing under MAMP localhost PHP 7.0.0, and hit some file permission problems.
The install went smoothly, but on my first visit to the Themes panel TXP warned me of no Write access to the /themes/ directory. I tried permissions 755, but had to settle on 777 to proceed.
I exported the theme to disk, but I can’t edit the templates – no permissions. Even trying 777 on an individual template file doesn’t help…
Am I missing the point of the export theme to disk feature? :)
Thanks
Update: managed to force access by using 777 for everything…
Last edited by giz (2018-04-03 21:23:18)
Offline
Re: 4.7.0 beta 2 Theme file permissions
This’ll be down to your hosting setup. And yes, it’s annoying and I haven’t found a satisfactory solution yet.
The permissions that the web server requires to write the files will be attributed to what the permissions are on the themes
directory, its contents and its parent(s). The owner and group will be whatever user permissions the web server requires.
These owners/groups are not always compatible with what your SFTP program or SSH login use. So you find that trying to edit/move any files from the command line or SFTP fails, while the web server is happy.
If you alter the owner info so that you can edit them from the command line, the web server (Textpattern in this case) can’t write to them.
There ought to be a way to specify group permissions such that everyone’s happy. I’ve tried but never quite managed it. I’ve even left the permissions so the web server could access everything and added myself to the same group as the web server.
With the permissions set to 770
, my vain hope was that it would let me write to the files because I had group write permissions the same as the web server. Sadly, the server had other ideas. Seems that the user must match the owner (or something) first before it considers group permissions. Odd, I’d have expected it to work.
Anyway, the upshot is that it’s a bind. Only way round it besides giving world write permission: sudo make me a sandwich.
EDIT: If anybody has found a neat way round this, please please let me know.
Last edited by Bloke (2018-04-04 08:50:31)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: 4.7.0 beta 2 Theme file permissions
Thanks Bloke.
EDIT: If anybody has found a neat way round this, please please let me know.
+1
Anyone know how the flat-file-template plugins work their magic?
Last edited by giz (2018-04-04 18:39:04)
Offline