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

Hudson commented on AMBARI-9828:
--------------------------------

SUCCESS: Integrated in Ambari-trunk-Commit #1889 (See 
[https://builds.apache.org/job/Ambari-trunk-Commit/1889/])
AMBARI-9828. Ability to handle envs where sudo is not available (aonishuk) 
(aonishuk: 
http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=3cdc032ee89346bde07aa69eb56dc2f34e826308)
* ambari-common/src/main/python/ambari_commons/constants.py


> Ability to handle envs where sudo is not available
> --------------------------------------------------
>
>                 Key: AMBARI-9828
>                 URL: https://issues.apache.org/jira/browse/AMBARI-9828
>             Project: Ambari
>          Issue Type: Bug
>            Reporter: Andrew Onischuk
>            Assignee: Andrew Onischuk
>             Fix For: 2.0.0
>
>
> Attempted to start "ambari-agent start" as root but it fails with "You can't
> perform this operation as non-sudoer user. Please, re-login as one" message.
> Commented out this code and start worked...
>     
>     
>     
>     echo "" | sudo -S -l > /dev/null 2>&1
>     if [ "$?" != "0" ]; then
>      echo "You can't perform this operation as non-sudoer user. Please, 
> re-login as one"
>      exit 0
>     fi
>     
>     current_user=`awk -v val=$EUID -F ":" '$3==val{print $1}' /etc/passwd`
>     
>     change_files_permissions() {
>       sudo chown -R $current_user "/var/run/ambari-agent"
>       sudo chown -R $current_user "/var/log/ambari-agent"
>       sudo chown -R $current_user "/var/lib/ambari-agent/data"
>       sudo chown -R $current_user "/var/lib/ambari-agent/cache"
>       sudo chown        $current_user "/usr/lib/ambari-agent"
>     }
>     
> I think there is a broader issue here with sudo in certain envs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to