[lttng-dev] Having Trouble with LTTng folders

Thibault, Daniel Daniel.Thibault at drdc-rddc.gc.ca
Tue Nov 19 11:48:35 EST 2013


Date: Tue, 19 Nov 2013 08:43:17 -0500
From: Michael Steppe <msteppe91 at gmail.com>

> I have set up another VM that only has a root account. Using Active Directory, I set up user accounts from my work's development network (giving everyone here at work the ability to sign in with their usernames and passwords), meaning root does not have permissions to edit files owned by these users. Here lies my problem:
>
> Let's say I sign in to the remote VM as user = "Scott". When I try and attempt to perform the "create" command through my plugin, I get:
>
> An error was encountered on 10.176.15.180 (10.176.15.180)
> Host: 10.176.15.180
> Command: /usr/bin/lttng create TRACE_111913_082211 -o /tmp/TRACE_111913_082211
> Exit Code: 1
> No output stream captured
> Error Output:
>    Error: Unable to create config file
>    Error: Command error
>
> I am assuming it is unable to create the config file because all the tracing folders and files are created and owned by root and root does not have access to write to Scott's home directory, where the config file should go. The trace is actually created, but not .lttngrc file is created.
> If I perform an 'lttng list" in the remote VM (signed in as Scott), I can see the TRACE_<date>_<time> and that its status is [inactive] (because we haven't started the trace yet).
>
> My question is this. Is there a way, in this version of LTT, to have the .lttng and .lttngrc folder/file to be located somewhere else? That way, all the tracing is done by root and the trace files are stored in /tmp and when the tracing is finished, root can give Scott ownership of the trace files?

   I think you need to change your $HOME when issuing the lttng command.  If 'Scott' has sudo privileges, you could prefix your lttng commands with 'sudo -H ' and that would do the trick.  Otherwise, just prefix the lttng command with 'HOME=/root '.  This must be done with all lttng commands, because the client looks .lttngrc up every time (unless you use the --session option common to nearly all commands).

Daniel U. Thibault
Protection des systèmes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)
Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)
R & D pour la défense Canada - Valcartier (RDDC Valcartier) | Defence R&D Canada - Valcartier (DRDC Valcartier)
2459 route de la Bravoure
Québec QC  G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
Gouvernement du Canada | Government of Canada
<http://www.valcartier.drdc-rddc.gc.ca/>



More information about the lttng-dev mailing list