Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2017-12-11 07:36:45

detail
Member
From: geez, I seem to be in NZ
Registered: 2010-07-13
Posts: 176
Website

file download path not writable

Humm. Not sure if this is the appropriate place to ask this. But it is a how-do-you-fix-this question.

So.

When I changed to a secure site my host changed my sites to a new server.

The path for a few downloadable files is now no longer providing a link.

File directory path is not writable: /home/content/d/e/t/detail/html/files

When I check the actual file path it is as follows:

ftp://173.201.146.242//files/what-I-want-downloadable.pdf

How do I change the path so it is, in fact, “writable”?

Edit: This has now been resolved.

Resolution on page 3 of this thread.

TLDR: I changed the file path.

Last edited by detail (2017-12-12 00:58:39)

Offline

#2 2017-12-11 08:23:28

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,615
Website

Re: file download path not writable

Check your diagnostics and look up what it says under textpattern path. On a standard installation (i.e. if you haven’t deliberately chosen another location), the file path is the textpattern path with /files in place of the last /textpattern, i.e. if the textpattern path is:

textpattern path: /home/content/d/e/t/detail/html/textpattern

The file path will be:

file path: /home/content/d/e/t/detail/html/files

Then check this is correctly entered on the Admin › Preferences › Admin panel.

Finally, in your FTP program, find that directory and set its permissions using the CHMOD / Set permissions command of your FTP program to 755. If that won’t work, you may have to set it to 777. That is not ideal but many hosts won’t work without that.

Note: if your experiencing this with the files directory, the same may also apply to your /images directory.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2017-12-11 09:15:45

detail
Member
From: geez, I seem to be in NZ
Registered: 2010-07-13
Posts: 176
Website

Re: file download path not writable

jakob wrote #308217:

Thanks Jakob. Man that was quick.

Just some other details. I’m still on TXP 4.5.5 and the server uses PHP version 5.3.24.

Then check this is correctly entered on the Admin › Preferences › Admin panel.

Yeah, that’s where I copied the code in my first post. The diagnostics pre-flight check says that the File directory path is not writeable.

Finally, in your FTP program, find that directory and set its permissions using the CHMOD / Set permissions command of your FTP program to 755. If that won’t work, you may have to set it to 777. That is not ideal but many hosts won’t work without that.

I’m on a Mac. My file info panel has a box labelled “Octal” with a value 705. I guess you are saying that should be set to 755. The info panel is showing rwx---r-x.

Note: if you’re experiencing this with the files directory, the same may also apply to your /images directory.

All the images are showing OK. But images has identical info in the same panel.

Offline

#4 2017-12-11 09:31:04

detail
Member
From: geez, I seem to be in NZ
Registered: 2010-07-13
Posts: 176
Website

Re: file download path not writable

This particular file has been downloaded 4000 times already, so it used to work.

In the content/files list all downloadable files are shown as Condition — missing.

There is also the: Warning: cannot write to file directory /home/content/d/e/t/detail/html/files.

I guess the other issue is the name of the file.

/file_download/18/Plenty+%2B+Donohue+Highways++29+images.pdf

Maybe I should give them all a more digitally friendly name.

Last edited by detail (2017-12-11 09:32:32)

Offline

#5 2017-12-11 09:48:15

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,615
Website

Re: file download path not writable

detail wrote #308219:

My file info panel has a box labelled “Octal” with a value 705. I guess you are saying that should be set to 755. The info panel is showing rwx---r-x. All the images are showing OK. But images has identical info in the same panel.

If you can download images and files okay, then they are being read okay and it is likely to be the rights and not the location or naming scheme.

Adjust the rights on your files and images directories successfully looser e.g. if 705 doesn’t work, then 755, 775 or 777 until you are able to successfully upload files and images. There’s a useful guide on chmod values and notations here. Do that on the server where the site resides. You’ll see lots of warnings about 777 on the forums, but in practice, I’ve found several hosts won’t work with anything less.


TXP Builders – finely-crafted code, design and txp

Offline

#6 2017-12-11 09:54:47

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,615
Website

Re: file download path not writable

To check the file path is correct if your site is hosted on a mac, you can open Terminal, then type:

cd {space bar}

and drag the folder from the finder into the terminal window. You should see the path automatically inserted into the cd (change directory) command.

If your site is on an online server, you need to check where your files directory is in relation to your textpattern directory and then construct the path from the Textpattern path as described above.


TXP Builders – finely-crafted code, design and txp

Offline

#7 2017-12-11 10:03:37

detail
Member
From: geez, I seem to be in NZ
Registered: 2010-07-13
Posts: 176
Website

Re: file download path not writable

I have a few things on my htaccess that may be affecting access to the files.

I’m not sure why or when they were added.

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

	RewriteRule ^(.*) index.php

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

Offline

#8 2017-12-11 10:19:35

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,615
Website

Re: file download path not writable

The htaccess values you quote look like the standard textpattern settings (here’s the htaccess for 4.5.5.).

Did none of the above work for you?


TXP Builders – finely-crafted code, design and txp

Offline

#9 2017-12-11 10:25:43

detail
Member
From: geez, I seem to be in NZ
Registered: 2010-07-13
Posts: 176
Website

Re: file download path not writable

jakob wrote #308227:

Did none of the above work for you?

Sadly no. I went up to 775. Maybe I should try 777.

The files have been uploaded and have been able to be downloaded for years. No problem there. They just show as being “missing”.

The only thing changed is the server, and the new PHP.

I guess I should install TXP version 4.6.2 as suggested.

Offline

#10 2017-12-11 10:35:44

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,293
Website GitHub

Re: file download path not writable

detail wrote #308216:

ftp://173.201.146.242//files/what-I-want-downloadable.pdf...

That’s weird. Where do you see this? In your prefs in the ‘File Diretcory Path’ setting? And why the double slash before files?

If you see files listed in the Files panel as missing it means Txp can’t find them – not necessarily to do with not being able to read them (permissions). It may be a permissions thing, but that would probably only be the case if they all showed as “missing”. If only a few are missing, then we need to work out what’s different with those files. The filenames themselves shouldn’t be an issue.

EDIT: just re-read one of your above posts. If the dir is not writable, it’ll be one of these things:

  1. Permissions, as jakob says.
  2. Wrong ‘File Directory Path’ setting in prefs.
  3. Both of the above.

When Txp says something is “not writable” it either means the directory exists and isn’t accessible, or the directory can’t be found at all (usually because the pref is pointing to a bogus location).

Last edited by Bloke (2017-12-11 10:41:30)


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

#11 2017-12-11 10:44:21

detail
Member
From: geez, I seem to be in NZ
Registered: 2010-07-13
Posts: 176
Website

Re: file download path not writable

Bloke wrote #308230:

That’s weird. Where do you see this? In your prefs in the ‘File Directory Path’ setting?

If you see files listed in the Files panel as missing it means Txp can’t find them – not necessarily to do with not being able to read them (permissions). It may be a permissions thing, but that would probably only be the case if they all showed as “missing”. If only a few are missing, then we need to work out what’s different with those files.

That address is just when I traced back from the link on my server. That’s my server address for where the file is located.

All the files listed under Files are “missing”. I have about 21 of them that have been uploaded on the server that have been downloaded for years. Now none of them are able to be downloaded. There are 20 pdfs and one mp3. All are listed as missing. But they are still on the server where they are supposed to be.

Last edited by detail (2017-12-11 10:46:12)

Offline

#12 2017-12-11 10:45:57

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,150
GitHub

Re: file download path not writable

Bloke wrote #308230:

That’s weird. Where do you see this? In your prefs in the ‘File Diretcory Path’ setting? And why the double slash before files?

Wild guess – OP is using Transmit or other similar FTP program and that’s the result when you copy+paste the directory location.

Offline

Board footer

Powered by FluxBB