Textpattern Forum

You are not logged in. Register | Login | Help

#1 2012-08-30 08:22:59

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 394

Permission issues with 'images' and 'files' uploaded via Textpattern

I have a localhoast site that I am migrating to a web host. While FTPing the files I noticed a large number of images and files were failing to upload. Upon further investigation I found that I could not view, move or rename the files in MacOS or Windows, receiving an error stating I did not have permission to preform the action. However the affected images and files all display fine on the (localhost) website and in the admin interface.

I’ve noticed that nearly all of the images and files uploaded after the 27th of April have been affected. According to my records shortly before that date my localhost setup was moved to a new server after my old one crashed and a number of files were corrupted. If a Textpattern core file was corrupted could this cause the issues I’m having? Alternatively could the setup of the new server cause this to happen? Or (clutching at straws) could using a plugin such as abl_droploader to upload multiple images be a factor?

Any advice would be much appreciated, especially if anyone might have advice on how to reset permissions for hundreds of images and files, so that I can start FTPing them to our web host.

Many thanks.

Offline

#2 2012-08-30 14:19:48

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 2,979
Website

Re: Permission issues with 'images' and 'files' uploaded via Textpattern

As you may already know, *nix-like systems, like MacOS or Linux, have a filesystem where files & directory belong to some user (and some group) and each one have a set of permissions (who can read/write/execute it).

My bet is that the situation is probably this one (or similar): after your localhost server was reconfigured, it seems that all of the images & files uploaded after 27th April have “www-data” (or “httpd” or “apache” or whichever) both as user & group, and that permissions are set probably as 640 (r/w for user, r for group, none for others). That’s why you cannot view, move or rename the files.
Also, that would explain why all affected images & files display fine on the localhost website, as when you access them via the browser, it’s Apache (run by user “www-data” or similar) the one accessing them and serving them to the browser.

So, you should chown (change owner/group) and/or chmod (change permissions) to be able to view, move, rename files.
I’d suggest you to take a peek at these articles:
www.cyberciti.biz/faq/how-to-use-chmod-and-chown-command/
www.cyberciti.biz/tips/unix-or-linux-commands-for-changing-user-rights.html


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2012-08-30 14:20:15

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 394

Re: Permission issues with 'images' and 'files' uploaded via Textpattern

It turns out that this is more likely a server issue. The IT department installed a copy of Wordpress to rule out a Textpattern issue. Exactly the same problems occurred when images and files were uploaded via the Wordpress’ admin interface. As for the file permissions the IT department reapplied the base permissions to all files on the server and everything seems to work as it should.

Offline

#4 2012-08-31 09:57:36

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 394

Re: Permission issues with 'images' and 'files' uploaded via Textpattern

Sorry maniqui I completely missed your post yesterday. Thank you so much for the information it’s proving very useful.

Offline

Board footer

Powered by FluxBB