aFish
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Week5, 10/18 LSA ### 檔案權限 + `chmod +x <filename>`替案檔所有人添加執行權限 + `u/g/o +/- r/w/x` 替特定群組添加權限 + 用數字來代表各個權限 + r:4 + w:2 + x:1 + -:0 + `chmod 444 test.txt` 權限變成`-r--r--r--` + `chmod 111 test.txt` 權限變成`-x--x--x--` + `chmod 000 test.txt` 權限變成`----------` + `chmod 777 test.txt` 權限變成`-rwxrwxrwx` + `chmod g+r test.txt` + 將權限加給group :::info + 問題:有辦法去砍身份不是自己的檔案? 有電腦的最高權限就可以 `sudo rm -rf Maildir` 如果沒有電腦的最高權限是沒辦法刪的哦 如果本來是自己沒有權限(不能讀)的檔案 copy 到自己的 home/ 底下,還是沒辦法讀的 + 問題:什麽是把root 關掉? 其實是避免root這個賬號被別人/遠端登入 - root這個帳號沒有辦法被遠端登入 - root 是所有系統都會有的帳號 + 問題:硬碟分割的意義? 如果整個大分割區有一個小地方壞掉就會影響整個分割區,但是磁碟分割後,壞掉了我們就只需要一個分割區一個分割區救援,甚至判斷壞掉分割區的重要程度,去考量要花多少時間金錢救援 磁區分很細的壞處: 一滿就是爆了 就寫不進去了,如果再加的話的功夫還蠻高的,例如:停機,有掉資料的風險 一個分隔區有沒有辦法在兩顆硬碟上面。簡單來説NO,複雜來説YES,可以透過軟體,lvm 但是做法複雜,也有風險。 ::: tmp 不容使用者去交換檔案的地方。 因爲他又 t bit. auth.log 是任何外部連缐都會記錄在這裏 ,内容包括ip , 名字 等等。 ### FHS `/boot` 跟根目錄通常會放在同一個硬碟裏面。 `/boot` 2-3版本的系統的版本,開機檔案50MB左右 `/boot` 可以不用分割 `/swap` 最少要記憶體的一半,如果是桌機可以用到記憶體的兩倍。 `/usr` 不太需要把這個磁區分割出來 `/var` 底下的/cache, /lib等等的獨立出來 ### Telnet + 輸入什麽東西在網路上都可以抓到,是純明文 + BBS 也是一種Telnet服務 ### Http + 都走純明文 + Connection Status 代碼 + 200 Ok + 300 滾蛋(redirect) + 400 使用者問題 + 500 伺服器問題 + HTTP/1.0 版本是最老的穩定版 ### 指令 + ` du -sh <directory>` : disk usage `-s` summary `-h` human readable + `whois` : 查看ip所屬單位 + `host`: 查看網址的ip + `telnet <ip/domain> <port>`: 遠端連線(明文) + `ssh <username>@<ip/domain>`: 遠端連線(密文) + `apt list-upgrade` 確定要更新的 ### 小知識 + [LVM](https://zh.wikipedia.org/wiki/%E9%82%8F%E8%BC%AF%E6%8D%B2%E8%BB%B8%E7%AE%A1%E7%90%86%E5%93%A1) (Logical Volume Management) + [Local Exploit](http://www.yourdictionary.com/local-exploit-or-intrusion) + [SSD比較不穩定](https://www.mobile01.com/topicdetail.php?f=159&t=5090784) + 有使用限制的 + 寫入多會比較快老化 + SSD存的檔案超過70%是會變慢的 + SLC 是比較耐寫的版本 + VPS (Virtual Private Server) 虛擬主機 + 如何讓機器知道使用者要連入機器的服務?輸入Port, 個別Port 個別服務。 + demo網址 http://ftp.ubuntu-tw.org/ + [Virtual Host](https://zh.wikipedia.org/wiki/%E8%99%9A%E6%8B%9F%E4%B8%BB%E6%9C%BA) : 在一臺機器擺很多不一樣的網站,回傳的東西會依據網址列輸入的東西。 + aptitude + / 搜尋 + ^ 開頭 + $ 結尾 + n 下一筆 + q 往上一層跳 + i 開頭代表要安裝的 + A 開頭代表Auto + gg 確定安裝 + `+` 要安裝 (綠色) + `-` 要卸載 (紫色) + u update ### VPS digitalocean 邀請連結(BT提供): https://m.do.co/c/7a14e0e84052

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully