• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

umask and CGI

G

Gorgon@

Guest
Hi folks,

I'm having a strange issue with file creation permissions when a CGI script runs. This doesn't seem to be a Plesk issue in particular but I'm wondering if anyone else has seen something similar.

The server is RHE v3, apache, etc. I confirmed from SW-Soft that their version of suexec is not compiled with a default umask. Thus, in theory, if you set the umask in the apache startup script, the apache sub-processes will adopt that umask.

This seems to work most of the time. Especially when I run my test CGI script. But in some cases, the umask defaults to 077. Since the file is only readable by the owner, the apache process (running as user apache) cannot read files created by the CGI script.

This can be a real pain. I have at least one customer running ShopSite which is a set of compiled programs. Thus I cannot edit them directly. I have a hack setup to fix the immediate problem. I've noticed this problem with other scripts too but those have been perl scripts and I've been able to modify them to set the umask internally.

But the question is, why does the umask seem to be correct sometimes but not all of the time? I have restarted apache a few times to make sure it has the correct umask at start time.

Since this is sort of off-topic for this forum, could anyone recommend a more appropriate forum?

Thanks,
M
 
Back
Top