#3790 Chroot directory relative access blocks file read

1.520
closed-fixed
5
2010-11-04
2010-11-01
Richard Lee
No

Under File Manager settings, if the
1) "chroot directory for entire file manager" is set
2) "only allow access to directories" is set

Then, when attempting to read files for the user with chroot the following java error is presented:
"Download failed: You are not allowed to access /bw/..."

All iterations have been tested

Discussion

  • Richard Lee

    Richard Lee - 2010-11-01

    error message

     
  • Richard Lee

    Richard Lee - 2010-11-01

    configuration of relevant File Manager module

     
  • Jamie Cameron

    Jamie Cameron - 2010-11-01

    Is the directory /bw under the chroot directory? When chroot is enabled, the "allow access to directories" list has to be relative to it..

     
  • Richard Lee

    Richard Lee - 2010-11-02

    As can be seen from the screenshot 34:

    Chroot directory for entire file manager: /bw/broadworks
    Only allow access to directories: fileRepos

     
  • Richard Lee

    Richard Lee - 2010-11-02

    So File Manager should allow access to files in /bw/broadworks/fileRepos but I am getting "cannot read" errors in Java

     
  • Jamie Cameron

    Jamie Cameron - 2010-11-02

    You need to enter the directories with a / at the start

     
  • Richard Lee

    Richard Lee - 2010-11-03

    Still no dice... adding the / was retested and still getting the same error...

    Chroot directory for entire file manager: /bw/broadworks
    Only allow access to directories: /fileRepos

    Error:
    "Download failed: You are not allowed to access /bw/broadworks/fileRepos/dataflex/script.txt"

     
  • Jamie Cameron

    Jamie Cameron - 2010-11-03

    When you get that error, what exactly are you trying to do in the file manager? Just navigating through directories, or actually opening a file?

     
  • Richard Lee

    Richard Lee - 2010-11-04

    The error occurs when attempting to open the file.

    I will try to install webmin on another system and see if I get the same error

     
  • Jamie Cameron

    Jamie Cameron - 2010-11-04

    /usr/libexec/webmin/file/show.cgi

     
  • Jamie Cameron

    Jamie Cameron - 2010-11-04

    Ok, I see the bug now. I have attached an update to the script /usr/libexec/webmin/file/show.cgi (or /usr/share/webmin/file/show.cgi if you are on debian) to this bug report. The fix will also be in Webmin 1.530.

     
  • Jamie Cameron

    Jamie Cameron - 2010-11-04
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks