chown

when should I use "apache:apache" or "nobody:nobody" on my web server files?

Background: I remember at my old place of employment how the web server admin would always make me change the httpd-accessible file upload directories so that they were owned by apache:apache or nobody:nobody. He said this was for security reasons. Question: Can you tell me what specifically were the security implications of this? Also...

Correct owner/group/permissions for Apache 2 site files/folders under Mac OS X (10.6)?

It's hard to find Mac-specific answers to this question on the web, so I'm hoping someone out there can put this one to rest for me? My permissions are screwed up on my sites and I'm not sure how to fix them without just slamming a recursive 777 on everything which is quite obviously incorrect. Thanks! ...

directory owner problem with tomcat

Hi, I have a uploader using applet and jsp,so after it is uploaded the owner is tomcat so it is not accessible by php i mean apache. its throughs error.i changed chown in php and directly in shell access. still i ant access that directory through php. please check my image. ...

PHP mkdir and apache ownership

Is there a way to set php running under apache to create folders with the folder owned by the owner of the program that creates it instead of being owned by apache? Using word press it creates new folders to upload into but these are owned by apache.apache and not by the site that they are running in. This also happens using ostickets. ...

Whats the python way for recursively setting file permissions?

What's the "python way" to recursively set the owner and group to files in a directory? I could just pass a 'chown -R' command to shell, but I feel like I'm missing something obvious. I'm mucking about with this: import os path = "/tmp/foo" for root, dirs, files in os.walk(path): for momo in dirs: os.chown(momo, 502, ...

Unix: command for sudo-mv-chown combo?

I am operating as sudo in a system where I mv a great amount of files and dirs to and fro. Is there a command for the combo? $ sudo -i; # mv hello /home/other; # chown -R other:other /home/other/hello ...

SSH Chown problems

I have a webserver with multiple domain and user accounts setup. Recently I renamed one of the domain names and changed it's username correspondingly. However, this new user cannot access the data from the domain because it does not have the required permissions. How can I solve this problem? I've tried chown and I still cannot get acce...

SSH copying folders

I have a folder on my server that I'd like to copy to another directory. However, after I copy it and navigate to the new folder, some of the directories are RED and I can't navigate into them. I think this has something to do with them creating links instead of actually copying the folders. cp -a site2.com/httpdocs site1.com/httpdocs ...

php chown exec() question!

Hi people, I need to write an exec to change owner on some folders on my webserver. This is what I am working with. exec('cd /xxxxx/xxxxxx/public_html/ && chown user.user * -R', $out); Got to be honest Apache is not my bag so kind of stumbling in the dark. Basically I need to change all directories to user and not 99 as they currentl...

Different file owner for files created via cron vs apache

Hi, I have a web application which has a shared config.php file. In this file, I include a function which gathers error messages (using set_error_handler) and then, at the end of the script execution, saves the errors to a centralised log file (using register_shutdown_function). Log files are created daily, in the format Y-m-d.log. Cro...