简体   繁体   English

Linux权限,apache和Cron选项卡

[英]Linux permissions, apache and Cron tabs

I am setting up a machine to run as a server under Ubuntu. 我正在设置一台在Ubuntu下作为服务器运行的机器。 Running Apache and php under as Lampp. 在Lampp下运行Apache和php。 I set Samba so I can read from my windows environment some of my linux files. 我设置了Samba,以便可以从Windows环境中读取一些linux文件。

So I have a user called ziggie who was set up on samba, so he can access the files and read/write them. 因此,我有一个名为ziggie的用户,该用户在samba上设置,因此他可以访问文件并对其进行读写。

On the other hand, Apache's httpd.conf says that apache's user is nobody , group ' nogroup ' 另一方面,Apache的httpd.conf表示apache的用户为nobody ,组为' nogroup '

I thought this might be fine, and then I thought that this may be not good if I wanted to monitor what apache did... 我认为这可能很好,然后我想如果要监视Apache所做的事情可能就不好了...

As my website also writes some logs, and uploads files, I was thinking that having nobody for apache would be too much, so I thought I need to give it an identity. 当我的网站还写一些日志并上传文件时,我以为没有人可以解决这个问题,所以我认为我需要给它一个标识。

My thought was to create a user for apache under a group similar to ziggie 's, (say webAdmins?), and this way I'll be able to have a better control of the permission? 我的想法是在类似于ziggie的组(例如webAdmins?)下为apache创建一个用户,这样我就可以更好地控制权限了? like disallowing access to most of the stuff to others , but allowing just some of the access to webAdmins ? 就像不允许others访问大多数内容,而只允许部分webAdmins访问? maybe changing ownership of many files to ziggie ? 也许将许多文件的所有权更改为ziggie Also I am going to run some crontabs, whose name are these running under? 另外我还要运行一些crontab,这些crontab的名称在下面运行吗?

What is a good enough approach? 什么是足够好的方法? Thanks! 谢谢!

Under Ubuntu, apache is normally run as www-data:www-data and its configuration stored in /etc/apache2/apache.conf I'm guessing from the configuration you have that you've installed from tarballs rather than debian packages? 在Ubuntu下,apache通常以www-data:www-data的形式运行,其配置存储在/etc/apache2/apache.conf我猜您是从tarball而非debian软件包中安装的配置中?

Changing permissions for the ziggie user is probably not necessary, though you could add it to the www-data group. 尽管可以将其添加到www-data组,但可能不需要更改ziggie用户的权限。 If ziggie only needs to change content for a website then none of that needs to be owned by www-data. 如果ziggie仅需要更改网站内容,则www-data无需拥有这些内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM