View Full Version : directory permissions mis-understanding

Chuck Crisler
19th August 2009, 01:08 AM
I am working with Apache, mod-perl and Mason for web development. Mason is a nice package that runs Perl scripts within Apache under mod-perl. When it runs, Mason needs a temporary directory and will create a default under the main Apache directory. You can specify a directive in the httpd.conf file to re-direct Mason to a different directory. I had numerous problems with this. Mason creates the default directory under /var/www/mason. It created that directory but failed with permission errors to create required sub-directories or files. The directory /var/www is owned by root and in the root group. The mason directory was also (hence the obvious failure). Mason runs under Apache and in the Apache context (user and group). I moved the mason directory to /usr/local, thinking that would be a reasonable place. However, that directory is also owned by root and the same thing happened. I changed the owner and group of the mason directory to apache and the permissions to 0777 but it still failed with the permissions error. I finally moved the mason directory to /tmp and that works. So my questions is: why did mason have a permission failure when trying to create directories and files in directories initially owned by root, even after I changed the owner and group to apache?

Thank you,