Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
September 1, 2008 - Submit Your Web Site for the Sept 2008 Site of the Month!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 07, 2008, 04:44:29 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: How can I change the permisson of one folder without plesk or cpanel ?  (Read 271 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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM