I hereby claim:
- I am oscarcck on github.
- I am oscarcck (https://keybase.io/oscarcck) on keybase.
- I have a public key ASBTzWna5QzJNiOgLRxbTKMkS1LjautuSgvqTz5fmfjTsAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Restricted SFTP-only access to a single directory using OpenSSH
Edit /etc/ssh/sshd_config
Match Group sftp-users
ForceCommand internal-sftp ChrootDirectory /home/sftp-users
PermitTunnel no AllowAgentForwarding no
| #compdef ey | |
| #autoload | |
| # ------------------------------------------------------------------------------ | |
| # Description | |
| # ----------- | |
| # | |
| # Completion script for Engineyard (https://github.com/engineyard/engineyard). | |
| # | |
| # ------------------------------------------------------------------------------ | |
| # Authors |
| [root @test /root ]# tar [-zxcvfpP] filename | |
| [root @test /root ]# tar -N 'yyyy/mm/dd' /path -zcvf target.tar.gz source | |
| 參數說明: | |
| -z :是否同時具有 gzip 的屬性? | |
| -x :解開一個壓縮檔案的參數指令! | |
| -t :查看 tarfile 裡面的檔案! | |
| -c :建立一個壓縮檔案的參數指令 | |
| -v :壓縮的過程中顯示檔案! | |
| -f :使用檔名,請留意,在 f 之後要立即接檔名喔!不要再加參數! | |
| 例如使用『 tar -zcvfP tfile sfile』就是錯誤的寫法,要寫成 |
| ./configure --with-shadow --enable-fhs \ | |
| --enable-overwrite \ | |
| --enable-krbV-uam \ | |
| --with-libgcrypt-dir \ | |
| --with-cracklib=/var/cache/cracklib/cracklib_dict \ | |
| --enable-zeroconf \ | |
| --with-init-style=debian |
| ; | |
| ; Netatalk 3.x configuration file | |
| ; http://netatalk.sourceforge.net/3.0/htmldocs/afp.conf.5.html | |
| ; | |
| [Global] | |
| ; Global server settings | |
| vol preset = default_for_all_vol | |
| log file = /var/log/netatalk.log | |
| uam list = uams_dhx.so,uams_dhx2.so |
| # .tm_properties file from http://gist.github.com/1478685 | |
| # --------------------------------------------------------- | |
| # --------------------------------------------------------- | |
| # Display the name of the home directory | |
| # --------------------------------------------------------- | |
| #windowTitle = "$TM_DISPLAYNAME - ${CWD/^.*\///}" | |
| #windowTitle = "$TM_DISPLAYNAME${TM_DIRECTORY/\A(?:\/Users\/Oscar\w+\/?(.*)|(.+))\z/${2:? – ${2/\A\/Users\/Oscar/~/}:${1/\A(?=.)/ – /}}/}" | |
| windowTitle = "$TM_DISPLAYNAME${TM_DIRECTORY/\A(?:\/Users\/Oscar\/Documents\/(?:work\/)?(?!\b(?:communication|programming|reference)\b)\w+\/?(.*)|(.+))\z/${2:? – ${2/\/Users\/Oscar/~/}:${1/\A(?=.)/ – /}}/}" |