Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have my hosting users on /bin/bash (chrooted) for SFTP.

How do I add unzip to the list of utilities they can execute?

Running Plesk Panel 9.5.2 on CentOS

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Running Plesk Panel 9.5.2 on CentOS

If you think that's relevant you may have problems understanding what's going to be involved.

First you need to find the files you need to copy -

$ which unzip

Will list the executable file you need to copy into their $PATH. You'll also need to check that this is not a symbolic link or a wrapper script:

$ file /usr/bin/unzip
/usr/bin/unzip: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), 
for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 
2.6.9, stripped

(this is compiled executable)

Then you need to find all the libs required:

$ ldd /usr/bin/unzip
    linux-gate.so.1 =>  (0x00d24000)
    libc.so.6 => /lib/libc.so.6 (0x00512000)
    /lib/ld-linux.so.2 (0x004f5000)

And add those libs to chroot lib dir if required. Note linux-gate is a virtual DSO - you won't find a corresponding file anywhere, libc and ld-linux will probably already be available in the chroot env.

C.

share|improve this answer
    
you are correct in assuming i am pretty clueless. your detailed post however was perfect and i followed your instructions up to chroot lib dir, which foxed me, but gave enough google ammunition to find the solution. technicallyuseful.wordpress.com/2009/07/30/… –  user48233 Jul 19 '10 at 12:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.