如何更改默认权限,上传的文件在安装根目录的Apache? [英] How to change default permission for uploaded files in apache with mounted webroot?

查看:103
本文介绍了如何更改默认权限,上传的文件在安装根目录的Apache?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我与Apache 2.2.20,PHP 5.3.6和Joomla CMS的安装的Ubuntu服务器11.10。我已经使用一个额外的硬盘作为我的Web服务器存储和安装入/数据/ WWW /(我希望这不是在我的问题我们!)。

I have an ubuntu server 11.10 with apache 2.2.20, php 5.3.6 and an installation of Joomla cms. I have used an extra hard disk as my web server storage and mounted it into /data/www/ (I hope it's not where my problem us!).

我为他们设置为[Ubuntu默认的用户(在我的情况电台)设置我的Web根目录中的所有文件和文件夹的权限,755和用户组:WWW的数据

I've set permission of all files and folders in my web root to 755 and user groups for them is set to [default ubuntu user(in my case radio)]:www-data.

在过去的日子里,我有严重的问题与Joomla不显示新上传的图片和其他文件,也无法安装任何扩展。搜索后几个小时,我发现,上传的文件不具有相应权限(它们是-rw -------)和Joomla应用程序无法读取,复制或上传之后移动它们。

In past days I had serious problems with joomla not showing new uploaded images and other files and also I can't install any extensions. After hours of searching I found out that uploaded files don't have appropriate permission (they are -rw-------) and Joomla application cannot read, copy or move them after upload.

我不知道我怎么可以设置默认权限,以便所有的文件,我上传使用它吗?

I’m wondering how can I set a default permission so all files that I upload use it?

PS:我测试过的umask,但它也没做。我认为这无关我的问题。

PS: I’ve tested umask but it did nothing. I think it has nothing to do with my problem.

推荐答案

谢谢您的回答。

经过研究,并试图小时,我设法通过禁用FTP(我用vsftpd的),并增加umask为apache配置,而不​​是PHP文件来解决我的问题。现在一切正常,所有chmods都OK(755)。

Thanks for your answer.
After hours of research and trying, I managed to solve my problem by disabling FTP (I've used vsftpd) and adding umask to apache configuration, not to php files. Now everything is working fine and all chmods are ok (755).

BTW:我不知道为什么有人上传以最少的访问文件

这篇关于如何更改默认权限,上传的文件在安装根目录的Apache?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆