为什么我的文件夹在网络上不可见?或者可以上传吗?
由于某些奇怪的原因,我无法再访问图像文件夹中的图像或其任何内容 https: //ksc105.kscserver.com/images/list.png 或 https://ksc105.kscserver.com/images/bold.png。我最初无法将文件上传到图像并尝试使用 chmod a=rw /var/www/images 但这没有帮助。我还将 php5 升级到最新的 ubuntu 版本。我该如何解决此问题以及如何解决我的上传问题?
当前图像不显示,因为我收到 403 错误:
禁止
您无权访问此服务器上的 /images/bold.png。 Apache 服务器位于 [..].com 端口 443
上传给我:
警告:move_uploaded_file(/[..].png):无法打开流:第 37 行 [..]/images.php 中的权限被拒绝
警告:move_uploaded_file():无法在线将 '/var/tmp/[...].png' 移动到 [..]/images.php 中的 '/var/www/images/nzoom.png' 37
[..] 只是我删除了无用的内容变量。
Ubuntu 9 上的 Apache 2 上的 PHP 5。
For some odd reason I can no longer access my images in my image folder or any of its contents https://ksc105.kscserver.com/images/list.png or https://ksc105.kscserver.com/images/bold.png. I orginally could not upload files to images and attempted to use chmod a=rw /var/www/images but that did not help. I also upgrade php5 to the latest ubuntu build. What can I do to fix this issue, and what can I do to fix my upload issue?
The current images do not display becuase I get a 403 error:
Forbidden
You don't have permission to access /images/bold.png on this server.
Apache Server at [..].com Port 443
Upload gives me:
warning: move_uploaded_file(/[..].png): failed to open stream: Permission denied in [..]/images.php on line 37
Warning: move_uploaded_file(): Unable to move '/var/tmp/[...].png' to '/var/www/images/nzoom.png' in [..]/images.php on line 37
The [..] is just me taking out useless variables.
PHP 5 on Apache 2 on Ubuntu 9.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我怀疑你搞乱了目录的权限。您可能想要这样做:
允许nobody/apache网络服务器用户访问它们
I suspect you've messed up the permissions on the directory. You probably want to do:
to allow the nobody/apache webserver user to access them
这肯定是与权限相关的。我建议您 chmod 您的:
0644
(如果 Apache 没有以同一个 [FTP] 用户身份运行,则为0666
)0755
(或者0777
,如果 Apache 没有作为同一个 [FTP] 用户运行)这样它们将始终是可执行的,并且您拥有进一步的写入权限在你的脚本中。
This is a permissions related probably most certainly. I suggest you chmod your:
0644
(or0666
if Apache is not running as the same [FTP] user)0755
(or0777
if Apache is not running as the same [FTP] user)This way they will always be executable and you have further write permissions from within your scripts.