Last modified: 2013-06-08 22:58:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T50726, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48726 - $HOME isn't set on webservers, causes jsub to try /$JOBNAME.out as output file
$HOME isn't set on webservers, causes jsub to try /$JOBNAME.out as output file
Status: RESOLVED FIXED
Product: Wikimedia Labs
Classification: Unclassified
tools (Other open bugs)
unspecified
All All
: High major
: ---
Assigned To: Marc A. Pelletier
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-22 19:57 UTC by Tim Landscheidt
Modified: 2013-06-08 22:58 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Tim Landscheidt 2013-05-22 19:57:06 UTC
PHP scripts & Co. get an unset $HOME.  When they call jsub, the latter tries to set the output file to /$JOBNAME.out (and .err).

It should be possible to use "(getpwuid ($<)) [7]" instead of "$ENV {'HOME'}" to fix jsub.

On Toolserver, $HOME isn't set as well IIRC, so this might not be a regression, but if $HOME would be set, it would probably make it much less surprising for a lot of users who think that it's always there.
Comment 1 Gerrit Notification Bot 2013-05-23 03:12:42 UTC
Related URL: https://gerrit.wikimedia.org/r/65007 (Gerrit Change I7d03609b0c901527c0dcd492ba99af64e517a13e)
Comment 2 Peter Bena 2013-06-08 10:15:52 UTC
BUMP

some idea how to fix this?
Comment 3 Marc A. Pelletier 2013-06-08 12:49:09 UTC
There does not seem to be a clean way to fix this; CGIs (and, by extension those invoked through suphp) do not have a $HOME set by the webserver under the presumption that it would be the apache user's and suphp is careful to not otherwise alter the environment.

This does need to be documented, however, to avoid confusion.
Comment 4 Tim Landscheidt 2013-06-08 19:44:13 UTC
(In reply to comment #3)
> There does not seem to be a clean way to fix this; CGIs (and, by extension
> those invoked through suphp) do not have a $HOME set by the webserver under
> the
> presumption that it would be the apache user's and suphp is careful to not
> otherwise alter the environment.

> This does need to be documented, however, to avoid confusion.

Eh, this issue has been fixed by Gerrit change #65007?
Comment 5 Marc A. Pelletier 2013-06-08 22:07:41 UTC
The patch fixes jsub's /dependence/ on $HOME being there, it doesn't put $HOME back in.  :-)
Comment 6 Tim Landscheidt 2013-06-08 22:58:44 UTC
(In reply to comment #5)
> The patch fixes jsub's /dependence/ on $HOME being there, it doesn't put
> $HOME
> back in.  :-)

So the lesson seems to be: Don't use commas in bug summaries :-).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links