我用wordpress压制了一个权限问题。 如你所见
ls -la wp-content/themes/impreza/
total 144
drwxr-xr-x 9 root root 4096 Oct 7 16:49 .
drwxr-xr-x 4 root root 4096 Oct 7 11:21 ..
-rwxr-xr-x 1 root root 330 Oct 7 10:33 404.php
-rwxr-xr-x 1 root root 340 Oct 7 10:33 archive.php
-rwxr-xr-x 1 root root 339 Oct 7 10:33 author.php
-rwxr-xr-x 1 root root 349 Oct 7 10:33 comments.php
drwxr-xr-x 2 root root 4096 Oct 7 16:48 config
drwxr-xr-x 2 root root 4096 Oct 7 10:33 css
drwxr-xr-x 10 root root 4096 Oct 7 10:33 demo-import
-rwxr-xr-x 1 root root 337 Oct 7 10:33 footer.php
-rwxr-xr-x 1 root root 355 Oct 7 10:33 forum.php
drwxr-xr-x 15 root root 4096 Oct 7 10:34 framework
drwxr-xr-x 3 root root 4096 Oct 7 10:34 functions
-rwxr-xr-x 1 root root 1105 Oct 7 10:33 functions.php
-rwxr-xr-x 1 root root 337 Oct 7 10:33 header.php
-rwxr-xr-x 1 root root 359 Oct 7 10:33 header-shop.php
-rwxr-xr-x 1 root root 361 Oct 7 10:33 index.php
drwxr-xr-x 2 root root 4096 Oct 7 10:33 js
-rwxr-xr-x 1 root root 325 Oct 7 10:33 page.php
-rwxr-xr-x 1 root root 18970 Oct 7 10:33 screenshot.png
-rwxr-xr-x 1 root root 388 Oct 7 10:33 searchform.php
-rwxr-xr-x 1 root root 344 Oct 7 10:33 search.php
-rwxr-xr-x 1 root root 645 Oct 7 10:33 single.php
-rwxr-xr-x 1 root root 365 Oct 7 10:33 single-us_portfolio.php
-rwxr-xr-x 1 root root 288 Oct 7 10:33 style.css
-rwxr-xr-x 1 root root 15056 Oct 7 16:49 us-logo.png
drwxr-xr-x 3 root root 4096 Oct 7 10:34 vendor
-rwxr-xr-x 1 root root 4341 Oct 7 10:33 wpml-config.xml
在我的主题文件夹中,所有内容都具有等同权限,但我无法全部访问它们。例如
不可见 - http://www.aniabuchi.com/wp-content/themes/impreza/us-logo.png
可见 - http://www.aniabuchi.com/wp-content/themes/impreza/screenshot.png
主题本身已经激活,但是当我尝试激活插件时,它还说“请调整文件权限以允许插件安装”。 这是我的第二个wordpress安装,我唯一的区别就是只使用一个wp-contents文件夹
/* Default value for some constants if they have not yet been set
by the host-specific config files */
if (!defined('ABSPATH'))
define('ABSPATH', '/var/www/aniabuchi/');
if (!defined('WP_CORE_UPDATE'))
define('WP_CORE_UPDATE', false);
define('DB_HOST', 'localhost');
if (!defined('WP_CONTENT_DIR') && !defined('DONT_SET_WP_CONTENT_DIR'))
define('WP_CONTENT_DIR', '/var/www/aniabuchi/wp-content');
答案 0 :(得分:0)
尝试制作图片777以查看您是否可以访问它们。
对于插件,你应该检查你的" wp-content / plugins"文件夹权限,而不是主题。
答案 1 :(得分:0)
您需要确保分配给文件和目录的所有者是Web服务器用户,否则无论文件/文件夹权限如何,wordpress都将失败所有插件安装或更新。在ubuntu / debian上,它通常是www-data,在centos / rhel / fedora上它是apache。
答案 2 :(得分:0)
试试这个并检查 - 它可能会起作用:
<!DOCTYPE html>
<html>
<body>
<div id="sidebar">
<ul id="mySidenav" class="sidenav">
<li><%= link_to "New Parking Permit", permitapplication_path %></li>
<li><%= link_to "Manage Permit", show_permit_path(@permit) %></li>
<li><%= link_to "New Visitor Parking Permit", visitorpermit_path %></li>
<li><%= link_to "Manage Visitor Permit", "#" %></li>
<li><%= link_to "Check Fines", "#" %></li>
<li><%= link_to "New Health and Safety Report", "#" %></li>
<li><%= link_to "Manage Health and Safety Report", "#" %></li>
</ul>
</div>
</body>
</html>