您好,登录后才能下订单哦!
这期内容当中小编将会给大家带来有关Magento中怎么设置文件与文件夹权限,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。
代码如下:
find . -type f -exec chmod 644 {} ; 
find . -type d -exec chmod 755 {} ; 
chmod o+w var var/.htaccess app/etc 
chmod 550 mage 
chmod -R o+w media 
If that is not working, try setting all directories to 777 by doing this: 
find . -type f -exec chmod 644 {} ; 
find . -type d -exec chmod 777 {} ; 
chmod o+w var/.htaccess 
chmod 550 mage 
magento中操作 
比如二级菜单不可用,Magento Connect 不可用,图片不显示等等,大部分原因都是文件权限没设置或者设置不当引起的。下面是基本的文件及文件夹设置。 
755权限 
代码如下:
magento/app/etc 
magento/media 
magento/app 
magento/skin 
magento/var 
magento/var/.htaccess 
magento/js 
magento/downloader 
644权限 
magento/index.php 
magento/downloader/index.php 
php修改权限 
代码如下:
<?php 
## 设置文件644,目录755 
function AllDirChmod( $dir = "./", $dirModes = 0755, $fileModes = 0644 ){ 
$d = new RecursiveDirectoryIterator( $dir ); 
foreach( new RecursiveIteratorIterator( $d, 1 ) as $path ){ 
if( $path->isDir() ) chmod( $path, $dirModes ); 
else if( is_file( $path ) ) chmod( $path, $fileModes ); 
} 
} 
?> 
上述就是小编为大家分享的Magento中怎么设置文件与文件夹权限了,如果刚好有类似的疑惑,不妨参照上述分析进行理解。如果想知道更多相关知识,欢迎关注亿速云行业资讯频道。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。