I am having a go at setting up my own Apache and can't seem to get my head around the permissions.
Lets say I grab a file from somewhere off the web and it has permission of 600.
I then upload this file via ftp to a user directory, which is also an apache virtual site, and so this file retains this permission of 600.
I have a cron job that runs a PHP script and creates files (images). But the cron job is running as me (being me my own username), not apache, nobody, httpd, www... and all the files created belongs to this user.
If I run the the same script through a browser, it runs as apache.
We have an Apache server which serves out of a particular directory, and just supplies a listing of files. From this directory, each subdirectory is owned by a certain group of users (at the filesystem level).
Possible Duplicate:
What are the best linux permissions to use for my website?
I have a debian system.
currently /var/www is owned (also group owned) by root
I have two problems. I want to be able to create users that can edit directories under /var/www . I am guessing I need to create a new group (ie: webdev) and give read/write permissions for /var/www.
I have a very interesting situation. I have a Debian Lenny server running Apache/2.2.9 and PHP 5.2.6-1+lenny10.
I have a directory in which collaborative files / directories are stored. Say directory abc is owned by root and the group is project-abc.
I'm running a sandboxed application as a local user. I now want to deny almost all file system permissions for this user to secure the system, except for a few working folders and some system DLLs (I'll call this set of files & directories X below).
The sandbox user is not in any group. So it shouldn't have any permissions, right?
I've read a lot of solutions for something like this, but nothing seems to work quite right for me.
I have a pretty standard server set up running Apache and PHP. An app I am running creates files and these are owned by the Apache user www-data. Files that I upload via SFTP are owned by my own user charlesr. All files are part of the www-data group.