Page 1 of 1
After taring a dir the images become inaccesable
Posted: Thu Jan 22, 2004 8:03 pm
by pinehead18
Ok, i have a website and when i run the backup i run and i tar it. And tar while doing so gives me a message saying it was unable to add the images (all the images in my pics) folder to the tar file.
Then when i go to my website even though the link to the image and the image name on the server are the same and was working before i ran my backup. The image does not display. it only displays one of those things that shows an image is suppose to show up.
Any ideas?
Thank you
Anthony
Posted: Thu Jan 22, 2004 8:04 pm
by markl999
If you right click on the image and view it's 'properties' is the path to it ok ?
Posted: Thu Jan 22, 2004 8:08 pm
by pinehead18
yes, that is one of the first thigns i checked. See i was working on it.. and it worked right beofre the backup. Then when i backed up all the images stopped working. Just the ones that i uploaded with my upload script though.
First thing I thought was i was stupid and somehow changed the path. Yet it is correct.
Posted: Thu Jan 22, 2004 8:13 pm
by pinehead18
Forbidden
You don't have permission to access /pics/image20040121094637.jpg on this server.
HMM i'm thinking some sort of permissions problem cuased by something? Its weird it happens only after i tar my dir.
That is what i get when i copy and past the link on the image.. After right hand clicking on it
Posted: Thu Jan 22, 2004 8:20 pm
by timvw
When you upload them through a form, it is the user under which your webserver runs (typically nobody/www-data) that owns the files.
Solution:
You execute a script through the webserver to chmod to 777 (so user foo gets access rights)
Posted: Fri Jan 23, 2004 8:52 am
by pinehead18
A php script?
Posted: Sat Jan 24, 2004 9:38 am
by timvw
whatever script, as long it gets parsed/executed by the webserver and not your user account.
fe chown.php:
<?php `chmod -R 777 /home/user/upload/images/*`; ?>
and call it with your webbrowser via
http://yourhost/chown.php
Posted: Sun Jan 25, 2004 2:35 pm
by Pyrite
Umm, is it your server or a hosted one?
Sounds like the permissions on your images were like that before you ran your backup and therefore have nothing to do with your backup either. Sounds like their were uploaded with a php photo gallery script of some kind. I had that problem sometimes, I just occassionally asked the admins of the server to recursively chown all the files in my $HOME to me. So if my user on the system was pyrite, I would ask them to (as root) ..
chmod -R pyrite /home/pyrite/
Posted: Sun Jan 25, 2004 11:42 pm
by timvw
you meant chown instead of chmod

Posted: Mon Jan 26, 2004 12:45 am
by Pyrite
DOH, you're right! thank you.