Drush alias partially working My Drush alias file is:

$aliases['mysite'] = array (
  'uri' =&gt; 'mysite.com',
  'root' =&gt; '/var/www/mysite',
  'path-aliases' =&gt; array(
    '%dump-dir' =&gt; '/tmp',
  ),
);


when I do drush @mysite status I get

 Drupal version         :  7.36                                          
 Site URI               :  mysite.com                    
 Database driver        :  mysql                                         
 Database hostname      :  localhost                                 
 Database port          :  3306                                          
 Database username      :  dbuser                                         
 Database name          :  dbname                                         
 PHP executable         :  /bin/php                                      
 PHP configuration      :  /etc/php.ini                                  
 PHP OS                 :  Linux                                         
 Drush version          :  7.0-dev                                       
 Drush temp directory   :  /tmp                                          
 Drush configuration    :                                                
 Drush alias files      :  /home/deploy/.drush/mysite.aliases.drushrc.php 
 Drupal root            :  /var/www/mysite                          
 Site path              :  sites/default 


But I'm unable to run other Drush commands.

eg: 

drush @mysite dd    
You need to specify an alias or run this command within a drupal site.           [error]    
Target 'root' not found.        [error]


OR

drush @mysite cc all
No Drupal site found, only 'drush' cache was cleared.                            [warning]
'all' cache was cleared.                                                         [success]


But drush dd commands works this way:

drush dd @mysite
/var/www/mysite


I tried like that, but this one doesn't work though
drush cc all @mysite

Any ideas why is that so, the site is running perfectly.
In drush status you should have the following lines right after Database credentials:

Database                        :  Connected
Drupal bootstrap                :  Successful 


When you don't have it, this suggest your Drupal instance is not properly configured and drush has problem bootstrapping it. For example, you may check if you can connect to the database, try: drush @mysite sqlc.

When executing dd on a remote machine, Drupal needs to be able to bootstrap on the configuration level, so it can read the variables. When you don't have the proper access, you'll have the error like:


  Target 'root' not found.


See also: drush_core_drupal_directory().



Other suggestions:


Make sure that on your local and remote you have got the same version of drush.
Other problems could include issues with specific PHP version (see: #779).
If you've still problems, run drush with verbose (-v) or debug options (-d).