Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2012-01-23 22:08:47

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: 755 'not writable'

Some webhosts use a setup that requires 777 permissions for file/image uploads to work.
The solution in that case is to switch to a different webhost, which allows you to use TXP with more sane file/directory permissions.

Offline

#14 2014-04-16 09:18:29

dorka
Member
Registered: 2012-10-04
Posts: 90

Re: 755 'not writable'

Hello,
I have the same problem uploading files via Txp.
I Uploaded my entire project, encluding Txp files, from my local machine to the host. When I try to upload files to the site from wuthin the cms interface it says: “File directory path is not writable: files” I than changed the permitions of the directory from 755 to 777 as sugested above, but it still doesn’t let me write in. I tried without .htaccess file in the directory (as sugested i a similar thread here), but nope. I looked around all my projects and I realized that it is the same on my local mashine. I have the same problem with one more project (but not all of them) on the local machine and it doesn’t work on the host either. I can’t seem to find any apparent difference between the instalations where it works and those where it doesn’t. And apparently it is not a problem of the hosting server. Here is the diagnostic:

Textpattern version: 4.5.5 (r5575)
Last update: 2014-02-14 14:38:43/2014-04-14 13:56:58
Document root: /home/pakucha/public_html/asensopovdop
$path_to_site: /home/pakucha/public_html/asensopovdop
Textpattern path: /home/pakucha/public_html/asensopovdop/textpattern
Permanent link mode: section_title
upload_tmp_dir: /tmp
Temporary directory path: tmp
Site URL: www.asensopovdop.com
PHP version: 5.2.17
GD Graphics Library: bundled (2.0.34 compatible); supported formats: GIF, JPG, PNG.
Server TZ: America/Los_Angeles
Server local time: 2014-04-16 01:46:37
DST enabled?: 0
Automatically adjust DST setting?: 0
Time zone:  (+72000)
MySQL: 5.5.30-30.1
Locale: en_GB.UTF-8
Server: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_hive/3.6 mod_bwlimited/1.4 mod_auth_passthrough/2.1 mod_qos/10.10
PHP server API: cgi
RFC 2616 headers: 0
Server OS: Linux 2.6.18-348.16.1.el5
Active plugins: zem_contact_reborn-4.0.3.20, zem_contact_lang-4.0.3.6m, rsx_page_number-4.0, spf_js-0.51, rss_admin_db_manager-4.3, adi_prefs-0.3.1
Admin-side theme: classic 4.5.5
------------------------
Pre-flight check: 
------------------------
File directory path is not writable: files
------------------------
------------------------
.htaccess file contents: 
------------------------
AddHandler application/x-httpd-php52 .php .php5 .php4 .php3
#DirectoryIndex index.php index.html
.bc 
#Options +FollowSymLinks
#Options -Indexes
#ErrorDocument 403 default
<IfModule mod_rewrite.c>
	RewriteEngine On
	#RewriteBase /relative/web/path/
	RewriteCond %{REQUEST_FILENAME} -f [OR]
	RewriteCond %{REQUEST_FILENAME} -d
	RewriteRule ^(.+) - [PT,L]
	RewriteCond %{REQUEST_URI} !=/favicon.ico
	RewriteRule ^(.*) index.php
	RewriteCond %{HTTP:Authorization}  !^$
	RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>
#php_value register_globals 0
# SVG
AddType image/svg+xml  svg svgz
AddEncoding gzip       svgz
------------------------
Any ideas, please?

Last edited by dorka (2014-04-16 09:20:33)

Offline

#15 2014-04-16 10:49:31

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: 755 'not writable'

dorka wrote #280267:

Any ideas, please?

Your path to the files directory is just pointing to non-existent location. The PopHelp for the file path preference states that:

This sets the absolute path to the directory where file uploads will be permanently saved. PHP needs to have write access to this directory.

Change your relative files to /home/pakucha/public_html/asensopovdop/files in your preferences.

Offline

#16 2015-06-20 20:05:54

sunmaker
Member
From: Washington DC
Registered: 2005-01-04
Posts: 40

Re: 755 'not writable'

This old problem has still got hold of us as we try to update our TXP site to 4.5.7.

Can’t write to /public/images and /public/files unless these are set to 777.

Currently, /public/images and /public/files are 775, which does not work despite the hosting company recommending 775 or 755 for folders. 755 also makes no difference. Only 777 will enable these folders to pass the pre-flight check.

Virtually all of the folders in the site have group and owner of 108243, which appears to be the equivalent to group “web” as the hosting company recommends.

Note also that the tmp folder automatically found by TXP is not in the textpattern folder. According to the TXP instructions the tmp folder used should be in the textpattern folder. But our installation found it in /home/tmp instead.

- – -

Textpattern version: 4.5.7 (r5900)
Last update: 2015-06-20 13:28:43/2015-06-20 13:25:41
Document root: /home/public/ (/home/public)
$path_to_site: /home/public
Textpattern path: /home/public/textpattern
Permanent link mode: messy
upload_tmp_dir: /tmp
Temporary directory path: /home/tmp
Site URL: kimelli.nfshost.com
PHP version: 5.5.26-nfsn1
GD Graphics Library: bundled (2.1.0 compatible); supported formats: GIF, JPG, PNG.
Server TZ: UTC
Server local time: 2015-06-20 19:53:29
DST enabled?: 0
Automatically adjust DST setting?: 0
Time zone: America/New_York (-18000)
MySQL: 5.3.12-MariaDB
Locale: en_US.UTF-8
Server: Apache
PHP server API: NFGI
RFC 2616 headers: 
Server OS: FreeBSD 10.1-RELEASE-p8
Active plugins: adi_gps-0.2, upm_date_archive-0.2.5
Admin-side theme: hive 4.5.7

Pre-flight check: 
------------------------
Image directory is not writable: /home/public/images
File directory path is not writable: /home/public/files
------------------------

<code>.htaccess</code> file contents: 
------------------------
#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes
#ErrorDocument 403 default

<IfModule mod_rewrite.c>
	RewriteEngine On
	#RewriteBase /relative/web/path/

	RewriteCond %{REQUEST_FILENAME} -f [OR]
	RewriteCond %{REQUEST_FILENAME} -d
	RewriteRule ^(.+) - [PT,L]

	RewriteCond %{REQUEST_URI} !=/favicon.ico
	RewriteRule ^(.*) index.php

	RewriteCond %{HTTP:Authorization}  !^$
	RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

#php_value register_globals 0

# SVG
AddType image/svg+xml  svg svgz
AddEncoding gzip       svgz

------------------------

All boundaries are for practical purposes only.

Offline

#17 2015-06-20 20:40:13

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: 755 'not writable'

sunmaker wrote #291736:

This old problem has still got hold of us as we try to update our TXP site to 4.5.7.

Can’t write to /public/images and /public/files unless these are set to 777.

Currently, /public/images and /public/files are 775, which does not work despite the hosting company recommending 775 or 755 for folders. 755 also makes no difference. Only 777 will enable these folders to pass the pre-flight check.

Virtually all of the folders in the site have group and owner of 108243, which appears to be the equivalent to group “web” as the hosting company recommends.

Note also that the tmp folder automatically found by TXP is not in the textpattern folder. According to the TXP instructions the tmp folder used should be in the textpattern folder. But our installation found it in /home/tmp instead.

I had a similar issue some years ago with the host I still use. Nothing would work unless folder and permissions were set to 777 despite the host’s recommendation for 755. When I asked them why only 777 would work for my TXP installations they told me that they didn’t support third party applications.Inevitably a bunch of my sites were hacked and then they sat up an paid attention. It turned out that it was a configuration issue that revolved around which process owned which folders. They moved all my sites to a another server that didn’t have those issues and that solved the problem. I was able to give all the folders a more secure set of permissions and we have never looked back.

It was all some time ago and I can’t remember the full detail. The point though is, that just because a host recommends 775 or 755 don’t leave it there, challenge them on why those permissions don’t work for your TXP installation. At the time, I knew I was on pretty solid ground because I transferred the hacked sites (with the hacks excised) to another host for a while and was able right away to apply a sensible set of permissions.

Last edited by joebaich (2015-06-20 20:41:19)

Offline

#18 2015-06-21 11:29:43

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: 755 'not writable'

^ What Joe says… and if they don’t fix it, switch to a different webhost.

Offline

Board footer

Powered by FluxBB