Current location: Hot Scripts Forums » Programming Languages » PHP » Permission Denied (Deleting Thumbnails/Cache)


Permission Denied (Deleting Thumbnails/Cache)

Reply
  #1 (permalink)  
Old 06-27-04, 03:24 PM
loose traffic loose traffic is offline
Newbie Coder
 
Join Date: Jun 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Permission Denied (Deleting Thumbnails/Cache)

I've recently installed Photo_Explorer. It came with (more or less) no readme. Just an explanation of the config file. The problem I've been running into is when I'd like to delete the thumbnails created a permission denied message is received. there's no use in chmoding the folders (same error comes up).

I was wondering what could be done, if there are anyways around this (etc).
Help is appreciated,
Thank You.
Reply With Quote
  #2 (permalink)  
Old 06-27-04, 03:27 PM
AndrewWest AndrewWest is offline
Newbie Coder
 
Join Date: Jun 2004
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
What are you chmodd'ing them too? If you're not chmodding them to 777 then that's more than likely why you're still getting errors.
Reply With Quote
  #3 (permalink)  
Old 06-27-04, 03:33 PM
loose traffic loose traffic is offline
Newbie Coder
 
Join Date: Jun 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
always 777. the error I receive in telnet:
chmod: changing permissions of 'public_html/photo_script/working/.thumb/picture.jpg': Operation not permitted

im stumped.

EDIT: incase this is relevant: the script requires no database. a similiar one included a button to clear the cache as a part of the script.. this one just doesnt seem to have it.

Last edited by loose traffic; 06-27-04 at 03:35 PM.
Reply With Quote
  #4 (permalink)  
Old 06-27-04, 03:36 PM
AndrewWest AndrewWest is offline
Newbie Coder
 
Join Date: Jun 2004
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
I've seen that before. It turned out to be the fact that the web host disables chomd'ing to 777 due to security issues (*In which I didn't understand then, and still do not*). Try CHMOD'ing to 755.
Reply With Quote
  #5 (permalink)  
Old 06-27-04, 03:41 PM
loose traffic loose traffic is offline
Newbie Coder
 
Join Date: Jun 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
no dice.
itd make sense because its a school.. but ive been able to chmod 777 through telnet and still am (755 didn't work). I'm pretty sure it's related to the script.. restricting access or .. im a php noob. ive got no clue.

thanks though
keeping at it
Reply With Quote
  #6 (permalink)  
Old 06-27-04, 03:58 PM
loose traffic loose traffic is offline
Newbie Coder
 
Join Date: Jun 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
this is the explanation given (from another script):
Server generated content may be owned by the web server and it may therefore not be possible to delete these files via ftp. You can use the setdown function provided to remove the cache and logs. Use the admin interface to remove server generated galleries and images. Please run this script before removing any other files.

photo_explorer doesn't have this
Reply With Quote
  #7 (permalink)  
Old 07-02-04, 01:09 AM
loose traffic loose traffic is offline
Newbie Coder
 
Join Date: Jun 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
for those who were wondering.. i found a fix awhile ago. you get the webserver to chmod itself to 777 through a script it runs...

Code:
<font size=+2> 
Gallery Cleanup Script 
</font> 
<p> 
Because Gallery runs as part of the webserver, any files it creates 
are owned by the webserver process.  If you want to modify those 
files yourself, you need to get the webserver to change the permissions 
on them so that you have access.  That's what this script is for. 
Simply enter the path to your albums directory below and this script 
will make every file in that path (that it can access) writable 
by everybody.  Then, you can do whatever you want to the files. 
</font> 

<p> 

Path (on your filesystem) to a file or directory to fix? 
<br> 
<font size=-1>(examples: /home/~you/public_html/albums, /usr/www/htdocs/albums)</font> 
<br> 
<form> 
<input name=dir> 
<input type=submit value="Go!"> 
</form> 

<? 

if ($dir) { 
echo "<hr>"; 
fix($dir); 
} 

function fix($obj) { 
if (is_dir($obj)) { 
status("Directory: ", $obj); 
if ($fd = opendir($obj)) { 
while (($child = readdir($fd)) != false) { 
if (!strcmp($child, ".")) { 
continue; 
} 

if (!strcmp($child, "..")) { 
continue; 
} 

$fullpath = "$obj/$child"; 
fix($fullpath); 
} 
chmod($obj, 0777); 
} else { 
error("Error reading dir", $obj); 
} 
} else if (is_file($obj)) { 
print "File: <b>$obj</b><br>"; 
chmod($obj, 0666); 
} 
} 

function status($msg, $obj) { 
print "$msg: <b>$obj</b><br>"; 
} 

function error($msg, $obj) { 
print "<font color=red>$msg: <b>$obj</b></font><br>"; 
} 

?>
name that to ANYTHING.php and run it. files the webserver created are now under your control
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FTP wont let me delete file. says Permission denied :( jamjammo The Lounge 0 02-11-04 07:00 PM
Permission denied when access excel obj msrnivas ASP.NET 0 12-05-03 02:18 AM
Permissions denied with PHP fopen, chmod etc paulj000 PHP 3 07-13-03 07:18 AM


All times are GMT -5. The time now is 05:07 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.