0

Its a well known problem: When migrating or deploying systems often log folders are not writable because of permission problems. But giving 0777 on them can be a security problem in a production system. Putting 0664 requires group permissions and certain scripts do not have for whatever reason. I do not think that anybody needs executables in a log folder though.

Is it a good choice to use 0666 for a log folder or is this not a good idea for some reason?

Need this for some PHP code which is used in different systems - currently it looks like this:

$logdir = __DIR__ . "/../log/";

try {
    @chmod($logdir,0666);
} catch(Exception $exception) {
    // try to go on in case of failure
}

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.