2013-05-06 49 views
1

我最近从一个托管在一个普通虚拟主机上的网站切换到了一个linode虚拟服务器,我安装了所有相应的部件。我移动了我的代码,除了我的图像上传器之外,我的复杂网络应用程序中的所有内容都无法创建新文件夹。在新服务器上无法启动mkdir,不确定为什么

我已经取得了进展,并放置在此的代码调试

$uid = "Blahblahblah"; 
$thisdir = getcwd() . "/" . $uid . "/"; 

if(mkdir($thisdir , 0777)) 
{ 
    echo "Directory has been created successfully..."; 
} 
else 
{ 
    echo "Failed to create directory..."; 
    echo " this dir Variable is:'" . $thisdir . "'" ; 
} 

其输出

Failed to create directory... this dir Variable is:'/home/jhstaffo/public/firstclassresearch.com/public/shopper/Blahblahblah/' 

为什么会出现这种情况 - 它是一个服务器设置什么错我的代码?到底是怎么回事?

+0

什么是当前工作目录的权限? – Raptor 2013-05-06 04:14:16

+3

'is_writeable(getcwd());' – 2013-05-06 04:14:55

+1

我试过chmod 0755 -R /home/jhstaffo/public/firstclassresearch.com/public/shopper无效is_writeable提供虚假的 - 任何想法 – 2013-05-06 04:25:30

回答

0

它出现在正确的方式来处理这个在Ubuntu的服务器 假设使用的Apache用户WWW的数据运行 - 这个功能现在适当

chown -R www-data:www-data /home/jhstaffo/public/firstclassresearch.com/public 
相关问题