3

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

1 Answers1

3

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.

symcbean
  • 21,009
  • 1
  • 31
  • 52
  • 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. http://technicallyuseful.wordpress.com/2009/07/30/add-programs-to-chrooted-environments/ –  Jul 19 '10 at 12:22