- แก้ปัญหาคอมอืด CPU usage เยอะเกินไปแล้ว
- ทั้งที่พึ่งลง Windows ใหม่แท้ๆ CPU usage มันปาเข้าไป 50% โดยเฉลี่ยเลย
- ลองเปิด task manager ดู show all user
- ก็เจอแค่ process ตัวนี้น่ะที่กินเยอะกว่าเพื่อนเค้า
- svchost.exe ไม่ใช่ไวรัสนะ แต่มันคือ ประมาณ โปรแกรมที่โดนสั่งทำงานโดย windows นั่นแหละ เราจะ terminate มันไม่ได้ นะ เพราะ ถ้ามันโดนทำลาย ระบบจะมีปัญหาทันที
- อ้าวแล้วทีนี้ผมต้องไปปิด Process ตัวใหนที่มันรันภายใต้ตัว svchost.exe ล่ะเนี๋ย
- หาข้อมูลในเน็ตต่อลองปิด windows update ก็แล้ว
- แต่ service ไม่อยากไปยุ่งกะมัน เลยไม่ปิดสักตัวที่รันใน service background
- สุดท้ายแล้วจบที่ปิดโปรแกรมที่ startup พร้อม windows login ก็พอ
Solved
- ใช้โปรแกรมเสริมนิดหน่อยคือ CCleaner
- เปิด CCleaner ขึ้นมาจากนั้นไปที่ Tools => Startup เลือก disable startup
- ในเคสเครื่องนี้ โปรแกรมพวก Adobe auto update มันเยอะจังเลยแฮะ ปิดมันให้หมดเลย disable มันซะ ที่มีคำว่า adobe นิ
- เปิดเครื่องใหม่ดู cpu usage อืม โอเคเลยแฮะ เปิดทิ้งไว้สักเกตุดูมันใช้ 0 - 2 % เองน่ะ แจ่มจริงๆ
เพิ่มเติม
- แต่ถ้าเห็น process ชื่อนี้ แสดงใน task manager เรา
scvhost.exe ,svch0st.exe, svchos1.exe, svchost32.exe, svhost.exe
- แสดงว่าเครื่องเราติดไวรัสแล้วครับพี่น้อง หาโปรแกรม anti malware free ดีๆ สักตัวมาสแกนให้เรียบร้อยนะ
อ้างอิง
- https://www.dsi.go.th/view.aspx?tid=T0000335
- http://www.thairetro.com/index.php?option=com_smf&Itemid=26&topic=25399.0
- Boot up Ubuntu 15.04 in live USB or live DVD
- Install and Run Boot-Repair
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install boot-repair && sudo boot-repair
- select "Recommented repair" choice for fix grub
sudo update-grub
Additional for alter method
- for create boot cd or usb
- http://sourceforge.net/projects/boot-repair-cd/files/
Ref
- https://damayanthiherath.wordpress.com/2015/07/09/boot-repair-ftw-how-to-fix-the-broken-grub-with-windows-7-and-ubuntu-15-04/
- แค่อยากจะให้ user ใช้แต่ ftp ไม่อยากให้ ใช้ ssh (sftp)
- จะทำไงดีล่ะ จำกัดการ remote ผ่าน ssh ของ user บาง user สิ
Solved
- open ssh config (cause befor change config please backup file)
sudo vi /etc/ssh/sshd_config
DenyUsers user1 user2 user3 ... userend
- ตำแหน่งที่ใส่ ควรใส่หลังบรรทัดที่ต่อจาก PermitRootLogin ประมาณนี้จะดี
- เพราะลองใส่ต่อจากบรรทัดสุดท้ายของไฟล์คอนฟิก บางเครื่องก็ deny ได้ แต่บางเครื่องมันต้องใส่ประมาณนี้แหละ
- หรืออีกคำสั่งคือ AllowUsers myuser1 myuser2 ... myuser_end อันนี้สำหรับอนุญาติ แต่แนะนำให้ใช้ deny น่าจะเหมาะกว่า
Ref
- http://www.cyberciti.biz/tips/openssh-deny-or-restrict-access-to-users-and-groups.html
- http://www.cyberciti.biz/faq/howto-limit-what-users-can-log-onto-system-via-ssh/
- ประเด็นมีอยู่ว่า สร้าง ftp แล้ว และ กำหนดให้ user เข้าไปแต่ home ของตัวเอง
- เหลืออีกอย่างคือ สร้าง vhost และ alias ให้ชี้ไปที่ home ของ user แล้ว
- พอ ftp login เข้ามาแล้วางไฟล์ เรียบร้อย
- แต่ user www-data ที่เข้าด้วย browser มันไม่พบไฟล์นั้นหว่า ประมาณว่า other ไม่มีสิทธิ์แม้กระทั่ง read
Solved
sudo vi /etc/vsftpd.conf
- เอาคอมเม้นของบรรทัดนี้ออกซะ
local_umask=022
sudo service vsftpd
- folder และ file ที่ create หรือ upload ขึ้นไป other user น่าจะได้สิทธิ์ read แล้วครับพี่น้อง
Ref
- http://serverfault.com/questions/571289/vsftpd-default-uploaded-file-permissions-on-ubuntu-not-working
OOPS: vsftpd: refusing to run with writable root inside chroot()
Solved 1
chmod a-w /home/$USER
Solved 2 (Recommented)
- Open vsftpd configuration file - /etc/vsftpd.conf
sudo vi /etc/vsftpd/vsftpd.conf
- add config append "chroot_local_chroot=YES"
- For the standard vsFTPd build (vsftpd):
allow_writeable_chroot=YES
- For the extended vsFTPd build (vsftpd-ext):
allow_writable_chroot=YES
- in this case test on Ubuntu 14.04 use standard it get about this line
chroot_local_user=YES
allow_writeable_chroot=YES
- Save and close the file. Restart vsftpd.
sudo service vsftpd restart
Ref
- https://www.benscobie.com/fixing-500-oops-vsftpd-refusing-to-run-with-writable-root-inside-chroot/
So
lved
- Open vsftpd configuration file - /etc/vsftpd.conf
sudo vi /etc/vsftpd/vsftpd.conf
- Make sure following line exists (and uncommented):
chroot_local_user=YES
- Save and close the file. Restart vsftpd.
sudo service vsftpd restart
Ref
- Tested on Ubuntu 14.04
- http://www.cyberciti.biz/tips/vsftp-chroot-users-limit-to-only-their-home-directory.html
- http://unix.stackexchange.com/questions/90472/jail-only-a-specific-user-with-vsftpd
- http://unix.stackexchange.com/questions/94603/limit-ftp-access-only-to-the-var-www-with-vsftpd