You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Eric Yang (Commented) (JIRA)" <ji...@apache.org> on 2011/09/29 19:13:45 UTC

[jira] [Commented] (AMBARI-18) Add special command to write config file

    [ https://issues.apache.org/jira/browse/AMBARI-18?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13117444#comment-13117444 ] 

Eric Yang commented on AMBARI-18:
---------------------------------

Successful response of the command:

{noformat}
{'exit_code': 0}
{noformat}

Failure response of the command:

{noformat}
{'exit_code': 1, 'stderr': 'Traceback (most recent call last):\n  File "FileUtil.py", line 43, in writeFile\n    os.chown(filename, user, group)\nOSError: [Errno 1] Operation not permitted: \'/tmp/_file_write_test2\'\n'}
{noformat}
                
> Add special command to write config file
> ----------------------------------------
>
>                 Key: AMBARI-18
>                 URL: https://issues.apache.org/jira/browse/AMBARI-18
>             Project: Ambari
>          Issue Type: New Feature
>          Components: agent
>    Affects Versions: 0.1.0
>         Environment: Python
>            Reporter: Eric Yang
>            Assignee: Eric Yang
>             Fix For: 0.1.0
>
>
> Add special command to write configuration file with proper ownership and permission setup.
> The required fields are:
> * Username
> * Group
> * Permission
> * Filename
> * Content
> Example:
> {noformat}
> cmd = [ 'ambari-write-file', 'eyang', 'staff', 0777, "/tmp/_file_write_test", "This is content of the file" ]
> FileUtil.writeFile(cmd)
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira