Avatar billede jfl Nybegynder
29. januar 2003 - 11:28 Der er 4 kommentarer

Bruger må kun opholde sig i sin egen mappe

Hvordan kan jeg sikre mig at en bruger kun kan opholde sig i sin egen mappe og kun har adgang til at se og læse filer i denne mappe?

Jeg ved at vs-ftp kan lave et chroot-jail, men dette skal også virke hvis brugeren logger ind via ssh.
Avatar billede jelzin101 Praktikant
29. januar 2003 - 11:34 #1
du kan forhindre at brugeren overhovedet skifter mappe med:
bash -r
;)
Avatar billede jelzin101 Praktikant
29. januar 2003 - 11:39 #2
sakset fra man bash:
RESTRICTED SHELL
      If  bash  is started with the name rbash, or the -r option
      is supplied at invocation, the shell  becomes  restricted.
      A  restricted  shell is used to set up an environment more
      controlled than the standard shell.  It  behaves  identi­
      cally  to  bash  with the exception that the following are
      disallowed or not performed:

      ·      changing directories with cd

      ·      setting or unsetting the  values  of  SHELL,  PATH,
              ENV, or BASH_ENV

      ·      specifying command names containing /

      ·      specifying  a  file name containing a / as an argu­
              ment to the .  builtin command

      ·      Specifying a filename  containing  a  slash  as  an
              argument  to the -p option to the hash builtin com­
              mand

      ·      importing function definitions from the shell envi­
              ronment at startup

      ·      parsing the value of SHELLOPTS from the shell envi­
              ronment at startup

      ·      redirecting output using the >, >|, <>, >&, &>, and
              >> redirection operators
      ·      using the exec builtin command to replace the shell
              with another command

      ·      adding or deleting builtin commands with the -f and
              -d options to the enable builtin command

      ·      specifying  the  -p  option  to the command builtin
              command

      ·      turning off restricted mode with set +r or  set  +o
              restricted.

      These  restrictions  are  enforced after any startup files
      are read.
Avatar billede jfl Nybegynder
29. januar 2003 - 11:43 #3
Tak, men det ser ud til at brugeren så ikke kan lave mapper i sin egen mappe. Og det skal denne kunne, samt kunne komme ned i dem.
Avatar billede jelzin101 Praktikant
29. januar 2003 - 11:47 #4
fandt en artikel på linuxdoc om hvordan man sætter bind op vha. chroot :
http://tldp.org/HOWTO/Chroot-BIND8-HOWTO-2.html
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
IT-kurser om Microsoft 365, sikkerhed, personlig vækst, udvikling, digital markedsføring, grafisk design, SAP og forretningsanalyse.

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester