Giter Site home page Giter Site logo

/home/user is empty about jail-shell HOT 7 OPEN

pymumu avatar pymumu commented on July 17, 2024
/home/user is empty

from jail-shell.

Comments (7)

pymumu avatar pymumu commented on July 17, 2024

Try the following configuration:

bind /home/%u /home/ rw,nodev,nosuid

from jail-shell.

jaimbh avatar jaimbh commented on July 17, 2024

yes it worked after I added your given command in the jail configuration below:
#Base directory binding configuration
#Set directory read-only, and prohibit device files
bind / ro,nodev,nosuid
bind /dev ro,dev,noexec,nosuid
bind /home/user /home/user rw,nodev,nosuid

But when I try to open a file inside /home/user through winSCP, I get the below error:
Cannot execute SCP to start transfer. Please make sure that SCP is installed on the server and path to it is included in PATH. You may also try SFTP instead of SCP.
Command failed with return code 127.

I got this error when I tried opening some files in /home/user.
Thanks

from jail-shell.

pymumu avatar pymumu commented on July 17, 2024

You should copy scp command into jail.

clink  /usr/bin/scp /usr/bin/scp

from jail-shell.

jaimbh avatar jaimbh commented on July 17, 2024

I want to put 5 users in the same jail. But those users should not be able to access other users' /home directory.

from jail-shell.

pymumu avatar pymumu commented on July 17, 2024
bind /home/%u /home/ rw,nodev,nosuid

%u means user name

from jail-shell.

jaimbh avatar jaimbh commented on July 17, 2024

How to give a jailed user access to entire /usr directory using bind mounts? I tried adding "bind /usr /usr ro,nodev,exec,nosuid" in jail conf. It did not work for me.

from jail-shell.

pymumu avatar pymumu commented on July 17, 2024

Bind the entire /usr directory is not supported because the /usr/bin/init program in the jail is required.

from jail-shell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.