Last modified: 2013-06-10 21:57:22 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 T50818, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48818 - OGE: Make *.out and *.err unreadable by the public by default
OGE: Make *.out and *.err unreadable by the public by default
Status: RESOLVED FIXED
Product: Wikimedia Labs
Classification: Unclassified
tools (Other open bugs)
unspecified
All All
: High critical
: ---
Assigned To: Marc A. Pelletier
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-25 19:17 UTC by Liangent
Modified: 2013-06-10 21:57 UTC (History)
4 users (show)

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


Attachments

Description Liangent 2013-05-25 19:17:58 UTC
They may contain passwords etc. in, for example, stack traces.
Comment 1 Tim Landscheidt 2013-05-28 02:19:44 UTC
http://marc.info/?l=grid-engine-users&m=112448326118257&w=2 (NB: from 2005, but I didn't find anything more current) suggests that the permissions are hardcoded in SGE.

But a small test ("jsub true"; "chmod 600 ~/true.{err,out} && jsub true") showed that SGE doesn't change permissions if the error and outputs file already exist.  So technically it seems to be possible to preemptively touch the error and output files.

However, a quick fix has the potential to severely disrupt jobs of users like me :-) who point "-o" to a directory.  So I'll think about a patch that considers these different use cases till next week.

My initial idea would be:

If the error and/or output file do not exist:
  If the user supplied a "-umask" option:
    "umask (oct ($umask));"
  Else:
    If we are a tool account:
      "umask (0007);"
    Else:
      "umask (0077);"
  If $stderr:
    Open and close error and output files.
  Else:
    Redirect STDOUT/STDERR to them.

This would provide a sensible default (if a user has no opinion, make the output  rw------- for users and rw-rw---- for tools), doesn't override the user's action outside of SGE (i. e., "chmod") and allows them to specify permissions for new logs in a clear way.
Comment 2 Peter Bena 2013-05-29 15:33:03 UTC
this is potential security issue, however there exist workaround as you can specify the output directory (which can just be not readable for others) should be resolved quickly
Comment 3 Peter Bena 2013-06-08 10:11:40 UTC
boosting - no response for weeks and this is a security issue
Comment 4 Marc A. Pelletier 2013-06-08 12:29:39 UTC
I can't seem to think of a scenario where a -umask option would make sense (as opposed to, you know, just setting umask).
Comment 5 Tim Landscheidt 2013-06-09 16:29:36 UTC
(In reply to comment #4)
> I can't seem to think of a scenario where a -umask option would make sense
> (as
> opposed to, you know, just setting umask).

If I want to make output files world-readable, and jsub sets umask to 0007/0077, how could I relax that by setting umask?!
Comment 6 Marc A. Pelletier 2013-06-10 21:57:22 UTC
Fixed by https://gerrit.wikimedia.org/r/#/c/67644/

Will be made avaliable next update of jobutils

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


Navigation
Links