I want to set up an account purely for someone/thing to access via SFTP.  I have already setup the home directory as /media/HardDrive/FTP  Is there any way to prevent this user (Bob) from accessing /media/HardDrive?  Probably a really simple thing to do but I want to lock them out of /media/HardDrive.  I'm still getting to grips with the whole Linux operating system so a step-by-step instruction guide on how to do this would be really helpful as I'm not totally sure what I need to do.
I want to give a client access to my server, but I want to limit those users to their home directories. I will bind-mount in any files I want them to be able to see.  I've created a user called bob and added him to a new group called sftponly. They have a home directory at /home/bob. I've changed their shell to /bin/false to stop SSH logins. Here is their /etc/passwd line:  bob:x:1001:1002::/home/bob:/bin/false   I've also changed the /etc/ssh/sshd_config to include the following:  Match Group sftponly         ChrootDirectory /home/%u         ForceCommand internal-sftp         AllowTcpForwarding no   When I try to log in as them, here's what I see   $ sftp bob@server bob@server's password:  Write failed: Broken pipe Couldn't read packet: Connection reset by peer   If I comment out the ChrootDirectory line I can SFTP in but then they have free rein over the server. I have found that ChrootDirectory /home works, but it still gives them access to any home directory. I have explicitly tried ChrootDirectory /home/bob but that doesn't work either.  What am I doing wrong? How can I limit bob to /home/bob/?  ----EDIT-----  Okay so I just had a look at /var/log/auth.log and saw this:  May  9 14:45:48 nj sshd[5074]: pam_unix(sshd:session): session opened for user bob by (uid=0) May  9 14:45:48 nj sshd[5091]: fatal: bad ownership or modes for chroot directory component "/home/bob/" May  9 14:45:48 nj sshd[5074]: pam_unix(sshd:session): session closed for user bob   I'm not entirely sure what's going on there,  but it suggests something is wrong with the user directory. Here is the ls -h /home output:  drwxr-xr-x 26 oli      oli      4096 2012-01-19 17:19 oli drwxr-xr-x  3 bob      bob      4096 2012-05-09 14:11 bob
Because of  I'd like to prevent apt-get upgrade and Update Manager from updating the "libgtk2.0-0" package.   How can this be achieved? Terminology of the sequences of promoters in relation to DNA strands I'm studying molecular biology and I'm trying to understand an experiment which shows the importance of promoters in the relative transcription level (RT). The image below comes from Rolf Knippers' book "Molekulare Genetik" (8th edition).    The legend says (among other things):     Die erste Zeile gibt die normale "Wildtyp"-Sequenz der 5'-flankierenden Region wieder.   Which, in english, means something like:     The first line repeats the normal wild-type sequence of the 5' flanking region.   The column on the right gives the relative transcription (RT) level, 1.0 being the highest possible level of transcription. As we can see, the lines where some parts of the "5' region" have been deleted give quite low RT levels, since some regions of the promoter are missing.  My questions are the following:  1) According to  and , I understand that RNA polymerase reads and uses both coding and non-coding strands in order to synthesize RNA. Therefore, how did they manage to use the sequences strands regions had been deleted to make a polymerase "read them" and perform transcription?  2) If the polymerase reads the template strand in the 3' -> 5' sense, shouldn't we talk of "ATAT box" or "TAAC box" instead of "TATA" or "CAAT" boxes? Does it mean that the "promoter" regions they are using on the graphic above are actually on the coding strand?  Thanks a lot for your help. Is it essential to use comma in a big number? Is it necessary to use comma in a big number? For example, if anyone writes one million four hundred thousand and two as 1400002 instead of 1,400,002 on answer sheet of listening section of IELTS test, will it be considered incorrect?  Thanks in advance. What's the difference between !, %, and @ in replacement tokens? How do I ping a website or IP address with Python? How to mathematically evaluate a string like "2-1" to produce "1"? What exactly happens when you browse a website in your browser? Corrupt MXD Causes? When does the set enter set theory? In episode 10 of Full Metal Alchemist: Brotherhood, during the events in the Research Lab 5, Edward Elric is severely hurt. Later in the hospital, he writes down everything he had come to know, and he discusses with Alphonse, Hughes, and Armstrong about what to do with the information to continue the investigation.  At this point, King Bradley arrives with lemon into the room. He finds out what they are doing but acts very calm and chilled out and allows them to continue investigation while being careful.  Why did he not get Hughes and Armstrong killed at that point? Or at least tell them to not investigate at all? Let $A$ and $B$ be $n\times n$ matrices such that $ABAB=0_{n\times n}$.  Can we conclude that  $BABA$ must be  $0_{n\times n}$?   I fail to give a counterexample when $n=2$， so I guess the answer is "yes" Where are my Screenshots? I pressed F2 to take a few Minecraft screenshots. Later I couldn't find them. Where are they stored on my computer? Shell command for outputting absolute path of binary Is there a shell command for outputing absolute path for specified program? I'd like to know where executable binary file is. Increasing real valued function whose image set is connected Let $S = [0,1) \cup [2,3]$ and $f\colon S \rightarrow \mathbb R$ be such that $f(S)$ is connected . Which of the following are true:  a) $f$ is discontinuous exactly at one point.  b) $f$ is discontinuous exactly at two points.  c) $f$ is discontinuous at infinite many points.  d) $f$ is continous.  I think $f$ is continuous . We need to show that $\lim_{x \to a^+}f(x) = f(a)$ for any $a \in S$. Since $f(x)$ is increasing, $\lim_{x \to a^+}f(x) \leq f(a)$. Suppose $\lim_{x \to a^+}f(x) &lt; f(a)$. Then there is $l$ such that $\lim_{x \to a^+}f(x) &lt; l &lt;f(a)$, which contradicts connectedness of $f(S)$. Similarly we can show that $\lim_{x \to a^-}f(x) = f(a)$.  I would be thankful if anyone would check my solution and correct me if there are any errors. Java: split a List into two sub-Lists? 17.10 Super key to open applications What is the maximum value of $n$ if $n + 5$ divides $n^5 + 5$, $n$ being a natural number? I tried to solve by binomial theorem but it failed. I use the following table:  \documentclass[a4paper,              12pt,                                        bibliography=totoc,              index=totoc,             abstracton,              headsepline,             ]{scrreprt}  \usepackage{booktabs}    \begin{document}   \begin{table}[H]\hspace*{-1cm} \centering \begin{tabular}{lcclll} \toprule  Company&amp; \multicolumn{2}{c}{exceedances (empirical)}&amp;exeedances (expected)&amp;no. of obs.\\ \cmidrule(r){2-3}\\ &amp;standard normal&amp;standardized Student's-t&amp;&amp;\\ \midrule Company1&amp;1&amp;5&amp;9&amp;13\\ Company2&amp;2&amp;6&amp;10&amp;14\\ Company3&amp;3&amp;11&amp;15\\ Company4&amp;4&amp;8&amp;12&amp;16\\ \bottomrule \multicolumn{4}{l}{\begin{footnotesize}an additional hint about a detail\end{footnotesize}} \end{tabular} \caption{Here is the caption.} \label{labelhere} \end{table}   \end{document}     Which gives    I have two problems:   The space after the \cmidrule(r){2-3} is too big, how can I change this? The table looks not that good, how can I improve it in general? What is the most "pythonic" way to iterate over a list in chunks? I have a Python script which takes as input a list of integers, which I need to work with four integers at a time.  Unfortunately, I don't have control of the input, or I'd have it passed in as a list of four-element tuples.  Currently, I'm iterating over it this way: for i in range(0, len(ints), 4):     # dummy op for example code     foo += ints[i] * ints[i + 1] + ints[i + 2] * ints[i + 3]  It looks a lot like &quot;C-think&quot;, though, which makes me suspect there's a more pythonic way of dealing with this situation.  The list is discarded after iterating, so it needn't be preserved.  Perhaps something like this would be better? while ints:     foo += ints[0] * ints[1] + ints[2] * ints[3]     ints[0:4] = []  Still doesn't quite &quot;feel&quot; right, though.  :-/ Related question: Install 18.04 server without network connection