일반유저가 /로 이동을 막으려면

han002의 이미지

리눅스에 계정을 하나만들어 줬습니다. ssh를 사용해서 접속합니다.

근데 그사용자가 /home 위로 올라가지 못하도록 하려면 어떡게 해야 하나요?

간단하거 같아서 검색을해봐도 실력이 딸려서 찾을 수 없네요.. :oops:

IsExist의 이미지

/home 에 대해 일반 사용자들이 포함된 group owner 인지 확인하시고
일반 사용자들의 group owner 인 경우 group owner 에 대해서도

read 와 execute 에 대해서 빼시면 됩니다.

# chmod o-rx /home

그룹까지 빼경우
# chmod g-rx /home

---------
간디가 말한 우리를 파괴시키는 7가지 요소

첫째, 노동 없는 부(富)/둘째, 양심 없는 쾌락
셋째, 인격 없는 지! 식/넷째, 윤리 없는 비지니스

이익추구를 위해서라면..

다섯째, 인성(人性)없는 과학
여섯째, 희생 없는 종교/일곱째, 신념 없는 정치

elflord의 이미지

IsExist wrote:

# chmod o-rx /home

그룹까지 빼경우
# chmod g-rx /home

이경우 유저가 가고싶은 디렉토리로 직접이동 해버리면 의미가 없지 않나요?

# cd /var

chroot등으로 jail환경을 구축해야 하는 것으로 압니다만... 간단하지 않더군요.


===== ===== ===== ===== =====
그럼 이만 총총...[竹]
http://elflord.egloos.com

지리즈의 이미지

elflord wrote:
chroot등으로 jail환경을 구축해야 하는 것으로 압니다만... 간단하지 않더군요.

네 정확하십니다.

참고로 상위 디렉토리 예를 들면,
/home/xxxx/에 접근권한이 없으면
/home/xxxx/yyyy/에 접근권한이 있어도 접근하지 못지 못합니다.

따라서 /에 접근할 수 없는 유저는
사실상 로그인이 불가능합니다.

어떤 웹호스팅 회사같은 경우 꽁수를 부려서,
ls, cd를 막았더군요. ^^

There is no spoon. Neo from the Matrix 1999.

vacancy의 이미지

http://chrootssh.sourceforge.net/

.. 이라는게 있더군요 .. 써보진 않았습니다 ..

xster의 이미지

solaris 10 에 버추얼 호스트 같은 기능이 있더군요.
실제 호스트 위에 가상의 호스트를 만들고 몇몇 기능만 사용할 수 있도록 제한해 놓고 사용하는 것이던데...
개념적으로 조금 더 간단하고 활용도도 상당할 것 같더군요.
공개적으로 개발이 되고 있다고도 들은 것 같은데. 정확히는 모르겠네요.

용어로는 Solaris Zones, Solaris Containers 라고 하네요.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.