XAMPP on Mac OSX: Why running as 'daemon'? [closed]

时光毁灭记忆、已成空白 提交于 2019-12-21 03:17:11

问题


I'm a little confused: I'm running an Apache server within XAMPP on my Mac OSX Macbook. I wrote an file upload script and it's working fine. But the uploaded files have as owner "daemon". How can I set me or 'root' as owner? Because now I'm not able to make any changes in the uploaded files...

Many thanks in advance and best regards!


回答1:


In /Applications/XAMPP/xamppfiles/etc/httpd.conf change

User daemon
Group daemon

to

User YourName
Group YourGroup

That's it!




回答2:


I recommend using your /home/Sites directory for editing the documents because it will be owned by the user automatically. Then add the user 'daemon' to the specific folder that needs to be writable by apache. sudo chown -R daemon:daemon or add the user to the group sudo usermod -a -G groupname username

Or you can simply give yourself writable access or vice versa: sudo usermod -a -G groupname username




回答3:


We use the daemon user for security reasons. Setting yourself or root as the user could potentially compromise the security of your site.

Have you tried editors with FTP editing capabilities such as Aptana? This could circumvent the issue.



来源:https://stackoverflow.com/questions/25821536/xampp-on-mac-osx-why-running-as-daemon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!