From the sounds of things, the issue is the permissions that the CGI runs as. If you can get the administrator to install a progrqam for you, I would suggest that you either get suEXEC (if you're running Apache), or CGIwrap (if you're running anything else).
Basically, these programs run the CGI as a particular user, so that the files that are created as the script's user, and not the user that the webserver is running as.
If the issue is just the permissions of the file, and not the ownership, then you can set a umask within your Perl script, or chmod files that have been created. (and, you won't need to involve your sysadmin)
Other options include setting up a cron job to keep forcing the permissions of files in the directory in question (which is a hack...I don't suggest it, if any of the other suggestions will work, especially as your sysadmin may restrict cron usage), or some file systems may have ways to specify the ownership and permissions of files created within a directory. (eg, setfacl in Solaris)
In reply to Re: switch user
by jhourcle
in thread switch user
by henry214
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |