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
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