in reply to Permissions problem with UpsideDownTernet

It's probably squid's umask. A umask is a set of bitflags that strips away file permissions when a new file is created. All processes on Unix inherit a umask from their parent (but may change their umask to whatever they like).

Squid's default umask is apparently 027, which means that it strips away write access from users within its group, and strips away read/write/execute access from uses outside its group. You can specify a different umask in your squid config.

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
  • Comment on Re: Permissions problem with UpsideDownTernet

Replies are listed 'Best First'.
Re^2: Permissions problem with UpsideDownTernet
by Cody Fendant (Hermit) on Feb 13, 2014 at 23:06 UTC

    Thanks. That makes a lot of sense.

    However it hasn't worked. I've added that directive but still all the files written by the perl script invoked by squid are unreadable. Even my hacky solution of adding a chmod line to the perl script didn't work. Very frustrating.

    Working with squid Mountain Lion seems to have big problems. It can't even correctly create its own directories in its own cache folder: folders it creates have permission d--------- and it can't write to a folder it created itself.

      Ignore the above: I was doing the umask all wrong. It is working fine now with a umask 022 directive in the .conf file.

      For the record I've got the MacPorts version of squid 2.7 (2.7.STABLE9 for i686-apple-darwin12.5.0) and XAMPP Apache (XAMPP for OS X 1.8.3-2) working just fine together on OS X 10.8.5 a.k. Mountain Lion.