打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Magento中文件与文件夹权限设置方法

如:安装插件,批量导入,后台配置,等等让人头痛。现在提供两种方式处理该权限问题

SSH方式(适用于独立服务器或VPS)

 

代码如下:
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 );
}
}
?>

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
SourceForge.net免费空间文件777权限安装joomla教程 ? 笨狐狸的博客
[教程心得] ubuntu12.10中修改system.img等
linux系统下修改文件夹目录权限
Linux文件夹执行权限不够如何处理?
ecshop 需要修改权限的文件夹及文件
CentOS LAMP怎么设置文件夹的权限
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服