SSH users can't use unzip

Discussion in 'Server Operation' started by lobius, Apr 9, 2012.

  1. lobius

    lobius Member HowtoForge Supporter

    They can use tar just fine.

    The problem is that joomla backs up to a zip file.

    Is there a file I can edit to allow this command?

    Also, it seems that the FTP user can see things in their particular root that they cannot see in SSH.

    All directories list(ls) under the user root of FTP. Nothing lists in the user root of SSH.

    How do I get SSH to show directories in the user root?
  2. falko

    falko Super Moderator ISPConfig Developer

    Does the unzip command exist? What's the output of
    which unzip
  3. lobius

    lobius Member HowtoForge Supporter

    Yes, I know it is crazy but it does, in fact, exist.


    I went around the problem by opening the archive on my desktop and sending it to the server. Everything is local so it went very quickly.

    sudo su asks me for the password to web1's account.

    What would that be? Client 1's FTP, shell… I can't figure it out.
  4. falko

    falko Super Moderator ISPConfig Developer

    sudo su asks for the password of the user as which you are currently logged in.
  5. lobius

    lobius Member HowtoForge Supporter

    Of course, falko. That is what it should be. It seems, however, that when a user logs in to their SSH account created by ISPconfig3, there's a different password.

    Maybe I missed it.

    login as: rex_SSH
    [email protected]'s password:
    Welcome to Ubuntu 11.10 (GNU/Linux 3.0.0-12-generic-pae i686)
     * Documentation:
      System information as of Thu Apr 12 19:54:13 EDT 2012
      System load:  0.05              Processes:           97
      Usage of /:   3.1% of 54.29GB   Users logged in:     0
      Memory usage: 54%               IP address for eth0:
      Swap usage:   14%
      Graph this data and manage this system at
    Last login: Tue Apr 10 12:10:50 2012 from
    web1@rule303:~$ sudo su
    [sudo] password for web1:
    Sorry, try again.
    [sudo] password for web1:
  6. falko

    falko Super Moderator ISPConfig Developer

    Is it possible that rex_SSH uses the same user ID as web1? Please check /etc/passwd.
  7. lobius

    lobius Member HowtoForge Supporter

    Here are the lines in question…

    The only one real difference looks like the ends with false vs. bash.

    What I'm trying to figure out is the permissions of a shell user without sudo. It's a good sign that they can't do that but… They have to be able to do some tasks or there is no point to it. Right now, it looks more restrictive than surveillance state monkeys like go daddy.
  8. falko

    falko Super Moderator ISPConfig Developer

    Both users have the same ID. I suggest you recreate the rex_SSH user with an unused ID (best below 5000).
  9. lobius

    lobius Member HowtoForge Supporter

    How did they both get the same ID? Is that a bug?

    I set it up in a ISPconfig3.
  10. lobius

    lobius Member HowtoForge Supporter

    Take a look at this…

    [email protected]:~$ ls
    [email protected]:~$ cd web
    bash: cd: web: No such file or directory
    [email protected]:~$ cd /web
    [email protected]:/web$ ls
    LICENSE.txt    configuration.php    index.php       media       tmp
    README.txt     custom_code          installation    modules     web.config.txt
    administrator  error                joomla.tar.bz2  plugins
    cache          eurofxref-daily.xml  language        robots.txt
    cli            images               libraries       stats
    components     includes             logs            templates
    [email protected]:/web$ sudo chown -R www-data:www-data
    bash: sudo: command not found
    [email protected]:/web$
    Can not executed basic staff to get joomla started.

    What is the point of shell for clients?
  11. lobius

    lobius Member HowtoForge Supporter

    Of course, works as root.

    root@rule303:~# cd /var/www/clients/client2/web4
    root@rule303:/var/www/clients/client2/web4# cd web
    root@rule303:/var/www/clients/client2/web4/web# ls
    administrator      eurofxref-daily.xml  libraries    robots.txt
    cache              images               LICENSE.txt  stats
    cli                includes             logs         templates
    components         index.php            media        tmp
    configuration.php  installation         modules      web.config.txt
    custom_code        joomla.tar.bz2       plugins
    error              language             README.txt
    root@rule303:/var/www/clients/client2/web4/web# chown -R www-data:www-data /var/www/clients/client2/web4/web
    root@rule303:/var/www/clients/client2/web4/web# find . -type f -exec chmod 644 {} \;
    root@rule303:/var/www/clients/client2/web4/web# find . -type d -exec chmod 755 {} \;
    Is there a way to fine tune the permissions without a blanket on/off for the jail kit?

Share This Page