Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-04-05 16:41:13

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 252
Website

755 'not writable'

Hello,
Diagnostics is telling me that Files folder is not writable, yet it has 755 permissions…
(4.4.0 here)

Thanks…

Offline

#2 2011-04-05 17:13:59

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

Re: 755 'not writable'

Try 775 or 777. If one those work then the directory is owned by a different user than the one that the PHP scripts run as.

Offline

#3 2011-04-05 17:56:39

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

Re: 755 'not writable'

You will get a message similar to that when the path to the Files directory in TXP preferences is incorrect, in the files tab for instance

Warning: cannot write to file directory /mnt/target02/xxxxxxx/www.xxxxxx.com/web/content/assets/files3

You can check quickly by looking at Diagnostics where the error message will be similar to:

File directory path is not writable: /mnt/target02//xxxxxxx/www.xxxxxx.com/web/content/assets/files3

Entering the correct path to the files directory in Advanced Preferences will fix it.

Last edited by joebaich (2011-04-05 17:58:23)

Offline

#4 2011-04-06 07:33:41

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 252
Website

Re: 755 'not writable'

Ruud, the latest time I put 777 I had a worm who took control of the website…

Offline

#5 2011-04-06 07:41:37

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

Re: 755 'not writable'

I’m not suggesting it as a solution, just as a way to diagnose the problem. Also see Joe’s post for another possible cause.

Offline

#6 2012-01-22 15:07:01

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

Re: 755 'not writable'

We’d like to update our 4.2.0 version of TXP to the latest version, but hesitate to do so because the Files tab doesn’t work.

Here’s our diagnostic:

Document root: /f5/pizzaiolo/public/ (/f5/pizzaiolo/public)
$path_to_site: /f5/pizzaiolo/public
Textpattern path: /f5/pizzaiolo/public/textpattern
upload_tmp_dir: /f5/pizzaiolo/tmp/
Temporary directory path: /f5/pizzaiolo/public/textpattern/tmp

File directory path is not writable: /f5/pizzaiolo/public/files

TXP says the files folder is not writable regardless of whether its permissions are 777 or 755, or its path in the Preferences has or does not have a trailing slash. There is no space in or after the path.

The Images tab works. The Image folder is set to 777. The owner and group for both the images and files folders are the same.

What to do?


All boundaries are for practical purposes only.

Offline

#7 2012-01-22 16:20:11

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

Re: 755 'not writable'

There has to be a difference in how you’ve set up images versus files, otherwise it would work. Please post full unsensored diagnostics and preferably also a screenshot that shows the permissions and ownership of the images/files directories and their contents.

Offline

#8 2012-01-22 18:37:35

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

Re: 755 'not writable'

Ruud, thank you for your prompt response. The problem appears to be resolved.

I set permissions again to 777 on /files and now Diagnostics reports all checks passed. I have successfully used the Files upload tab.

I’m not sure why the problem occurred. I may have believed that my FTP application changed the permissions when in fact it had not completed the change.


All boundaries are for practical purposes only.

Offline

#9 2012-01-22 19:03:51

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

Re: 755 'not writable'

You should not have any folders, including TXP’s ‘files’ and ‘images’ folders, set to 777 in an operational site. It’s fine to do that to help diagnose a problem but that’s it. If you leave them set to 777, there is a good chance that your site will be hacked sooner or later, I speak from bitter experience. 755 is the minimum permissions setting to keep the ill-disposed at bay. It allows the folders ‘owner’ only to write to it. If your site does not operate as intended with the ‘images’ and ‘files’ folders set at 755 it’s possible you don’t have ownership of them and that some other process does. You should talk with your host about getting ownership of your site’s folders. If they cannot do it, then you can’t run a secure Textpattern installation with them and should seek out a new host that can. All reputable hosts should be able to do it.

Offline

#10 2012-01-22 19:14:36

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

Re: 755 'not writable'

Joe, I will take your comment seriously.

I tried 755 on the folder several times with the result always that this TXP installation considered it not writable.

The site in question is on a commercial hosting provider. I will have the site owner inquire as you recommended.


All boundaries are for practical purposes only.

Offline

#11 2012-01-22 21:18:12

Mats
Member
From: Sweden
Registered: 2011-01-16
Posts: 30
Website

Re: 755 'not writable'

Hi!

I had the same issue on a host and got it working by using this path structure: /f5/pizzaiolo/public/textpattern. The file folder isn’t there but it works anyway…

/Mats

Offline

#12 2012-01-23 02:47:48

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

Re: 755 'not writable'

I have the same problem. If I have, for example, the rights of the file directory with 755, the diagnostic says: “File directory path is not writable.”

And the Textpattern help indicates:

Diagnostics: Directory is not writable

To use the file and image upload capabilities, these directories have to be writable by PHP. Usually this means you have to change permissions to 755 or 777 (depending on your host). This can be done with your FTP client, or alternatively on the command line by issuing a: chmod 755 /path/to/dir

I understand ruuds arguments, but, why the help indicates 777 could be a solution? And, in all my installations I can only get the CMS to work, if I set the rights for “images” and “files” to 777.

I don’t see what I could do differently.

Offline

#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

Board footer

Powered by FluxBB