Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 25, 2012, 09:47:25 AM

Pages: [1]   Go Down
  Print  
Author Topic: How can I change the permisson of one folder without plesk or cpanel ?  (Read 617 times)
Jessamine
Trekkie
**
Offline Offline

Posts: 11


« on: June 05, 2007, 08:14:11 PM »

I have upgraded my web server to VPS recently. There is still one issue something about php I can't resolved. Your System Admin Team recommend me to ask for help here.

Here is my issue:
When I use my forum before,I can "upload" my image file smoothly. But it doesn't work now.I checked my php program which was not programmed by me and found these commands  not be executed.

---------------------------------
copy($image1,"imgdb/".$pics);
chmod("imgdb/".$pics, 0755);
---------------------------------------

I think the main reason is the permission of my folder, so that  the copy fouction is invalid.
How can I change the permisson of one folder without plesk or cpanel ?


I hope somebody can help me. Thank you very much.


For more details of my script:
---------------------------------------------
// copy image file
if($image1 != "none" && $image1 != "")
{
$pics = md5(uniqid(microtime(),1)).getmypid().".jpg";
if (!$fp=@fopen($image1,"r"))
{
echo "File open failed.";
}
else
{
copy($image1,"imgdb/".$pics);
chmod("imgdb/".$pics, 0755);
$size = makeimg("imgdb/".$pics);
if($size > 1024)
{
unlink("imgdb/".$pics);
mysql_query("DELETE FROM $table_name WHERE id=$id");
mysql_query("UPDATE $table_name SET replays=replays-1 WHERE id=$parent");
echo "Over 1024 ";
exit;
}
mysql_query("INSERT INTO imgdb(cid, sid, iname, itxt, parent) VALUES('$cid','$id','$pics','$desc1','$parent')");
}
unset($pics);
unset($fp);
}
------------------------------------------------------------
Logged
testall
Intergalactic Cowboy
*****
Offline Offline

Posts: 70


« Reply #1 on: June 05, 2007, 10:06:19 PM »

I guess you have to use SSH to login as root, then you can change do what ever you want.
Logged
Jessamine
Trekkie
**
Offline Offline

Posts: 11


« Reply #2 on: June 05, 2007, 10:24:55 PM »

Thank you for your advice. I have resolved my issue but I really interested in SSH now.I will learn something about it.

Thank you very much.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: