如何设置linache下的apache所有权(centOS)? [英] How to set ownership for apache under linux (centOS)?

查看:282
本文介绍了如何设置linache下的apache所有权(centOS)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想安装和使用prestashop,但现在它只能正确工作,当我设置权限为777(我可以通过shell用root权限登录服务器)。安装时我得到这个错误递归写入权限apache用户...,只有工作权限设置为777.我不喜欢这个想法,因为安装后我甚至不能改回755或775.我也会得到问题部分解决时,当我更改用户所有权到apache,但后来我不能做任何与我的ftp客户端与该文件夹。



用户所有者是ftp和组所有者是psacln?我应该如何改变文件夹的成员资格,所以我可以通过ftp和允许Apache使用presta文件做事情? (当然有权限设置不高于775)。 BTW,添加或删除用户的组成员资格时,我必须重新启动服务器吗?

解决方案



ssh root @ ip_address



chown -R www-data:ftp / var / www / prestashop

您不需要重新启动服务器。



可选:
service apache2 reload


I want to install and use prestashop but now it only works correctly when I set permissions to 777 (I can login to the server via shell with root privileges). While installing I get this error "recursive write permissions for apache user on..." and only works for permissions set to 777. I don't like this idea because after installation I can't even change back to 755 or 775. I also get problem partly solved when I change the user ownership to apache but then I can't do anything with my ftp client with that folder.

The user owner is ftp and the group owner is psacln? How should I change the membership of the folders so I can work both through ftp and allow apache to do things with presta files? (and of course have the permission set not higher then to 775). BTW, do I have to restart a server when adding or removing user's membership of the group?

解决方案

This should fix your problem.

ssh root@ip_address

chown -R www-data:ftp /var/www/prestashop

You don't need to restart the server.

Optional : service apache2 reload

这篇关于如何设置linache下的apache所有权(centOS)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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