When I run ls -l on the www folder and everything that's inside, I see that root:root are the owner/group
When I run ps aux | grep apache2, I get the first process owned by root (I assume this is normal, but why is it owned by root and not www-data?) and I get 6 other processes owned by www-data.
Now, since the ls -l /var/www shows -rw-r--r--, it should mean that www-data has no write privileg
I wish to set my whole web architecture owned by root:root, and allow the apache user reading rights only.
I don't know whether it is possible: chmod -R 744 makes it return a E403 from the browser, pemission denied to access xxxx.php
But since Apache is public ("other"?) it should be able to "read" right? I don't understand it.
Not sure if this is possible but is there a way to grant the Apache user same level of permissions (ownership) as root only on specific folder(s).
Why I need this:
We have a CentOS 6.2 server with apache setup as our development server, and we use only the root user because the server is an internal server and doesn't have any outside access, every day we upload quite a lot of files and setup new
I'm setting up a sandbox type of server that will be used by a couple users as a development environment and knowledge base. The server will have a web frontend so I've installed Apache, MySQL and PHP.
Out of the box, everything under /var/www is owner by root:root. I haven't run a web server in a while but I'm pretty sure this isn't the best way of doing things.
My first question, so be kind...
Basically, I have a folder that a user group has access to. This folder has a program in it that runs as root(via sudo) then outputs result files(xml files) to a subdirectory. Now, whenever the command is run it outputs the results with ownership of root(since that is who ran it).
Ping is a a program owned by root with the user id bit set.
$ ls -l `which ping`
-rwsr-xr-x 1 root root 35752 Nov 4 2011 /bin/ping
As I understand it, if a user runs the ping process, then the effective user id will change from the real user id (i.e. the user id of the person who launched the process) to the user id root.
I'm new to nginx, but over the past couple of days I've been learning about the features and all it has to offer. I'm running nginx in Centos 6.3.
I've installed nginx with php-fpm but have a few questions about users and groups.
When I install nginx it sets the user/group to nginx. I've set up my box to have all the server block accounts (vhosts) in /accounts/example.com/public_html.
When I ssh into my server I log in under root or my user on the system.
However, when I checkout from my svn repos then are then owned by either root or my user, and therefore all files deployed to my server come up with a 500 error on the server with the message "UID of script is less than MIN_UID".
When I FTP files to the server they are owned by user "Sites" so is there any way I can log in u
Catch 22: If I open my text editor without using sudo, I don't have permission to save any changes. If I open it with root privileges, any files I create are owned by root. I want to be able to create files that are owned by me (non-root user), and also edit files that require root access in the same session. Possible? Is this a Linux thing or a text editor setting?
I'm using Sublime Text 2.