彰化縣學校資通安全稽核網站:https://audit.mychc.site/
彰化縣學校資通安全稽核網站管理登入:https://audit.mychc.site/admin/
登入之後的設定:
1.稽核設定->年度稽核學校->新增學校
1.指派稽核員:
值得注意的是1.指派稽核員完成之後,才能開始與建立稽核報告
彰化縣學校資通安全稽核網站:https://audit.mychc.site/
彰化縣學校資通安全稽核網站管理登入:https://audit.mychc.site/admin/
登入之後的設定:
1.稽核設定->年度稽核學校->新增學校
系列文章:
01.python 不管何時何地,只要點兩下,資料夾內的所有pdf都會合併成一個pdf
https://skjhcreator.blogspot.com/2022/06/pythonpdfpdf.html
02.python 只要點兩下,分別對各資料夾內的pdf合併,合併後的檔名要讓人知道來自哪個資料夾
https://skjhcreator.blogspot.com/2022/06/python-pdf.html
03. 只要點兩下,就能將一堆的Doc與Docx 轉成 PDF
03.https://skjhcreator.blogspot.com/2023/05/docdocx-pdf.html
04.只要點兩下,就能將一堆的JPG轉成一個PDF,並以JPG所在的資料夾名稱為PDF的檔名
04.https://skjhcreator.blogspot.com/2023/06/jpgpdfjpgpdf.html
05.只要點兩下,就能將放進input的一堆PDF轉成各自的WORD
05.https://skjhcreator.blogspot.com/2023/10/inputpdfword.html
06.只要點兩下,就能將放進input的一堆PDF轉成在ouput資料夾內的各自的WORD
06.https://skjhcreator.blogspot.com/2023/10/inputpdfouputword.html
07.只要點兩下,就能夠將InputAndOutput資料夾底下的子子孫孫資料夾內所有Word通通轉成PDF
07.https://skjhcreator.blogspot.com/2024/09/word-word-pdf.html
08.只要點兩下,就可以將資料夾input內的所有Word通通轉成一個PDF
08.https://skjhcreator.blogspot.com/2025/07/inputwordpdf.html
09.只要點兩下兩次,就能依照設定拆分指定PDF頁數並合併成設定好的一個PDF
09.https://skjhcreator.blogspot.com/2025/09/pdfpdf.html
10.只要點兩下,就能將input資料夾內所有PDF進行容量壓縮-版本01
10.https://skjhcreator.blogspot.com/2026/04/inputpdf.html
11.只要點兩下,就能將input資料夾內所有PDF進行容量壓縮-版本02
11.https://skjhcreator.blogspot.com/2026/06/inputpdf-02.html
Just double-click to compress the file size of all PDFs in the input folder – Version 02.
PDF 壓縮設定為:
screen = 最小檔案,適合螢幕閱讀
ebook = 一般文件,推薦使用
printer = 列印品質
prepress = 印刷品質
由於版本01 將壓縮設定 固定在 ebook,也就是一般文件,推薦使用。當想要提高壓縮比,版本01就無法滿足。所以版本02就將壓縮設定寫進 setting.ini,若 setting.ini 不見了,版本02還可以生成。讓使用者可以修改 setting.ini,來滿足其需求。
PDF Compression Settings:
In Version 01, the compression setting was fixed to ebook (standard document quality), which is recommended for general use. However, when a higher compression ratio is required, Version 01 cannot meet that need.
To address this limitation, Version 02 stores the compression setting in setting.ini. Users can modify the setting in setting.ini to suit their specific requirements. In addition, if setting.ini is missing, Version 02 can automatically regenerate it, ensuring the program continues to function properly.
方法:Python + Ghostscript
一、下載與安裝 Ghostscript
到 https://www.ghostscript.com/download/gsdnld.html 下載後,點兩下進行安裝
二、Python 程式碼
檔案:pyPdfCompress01.py
檔案內容:
最近需要將m4a檔案轉檔為mp3,所以寫python程式來處理。希望將很多的m4a放進input資料夾內,只要點兩下滑鼠就能將這些m4a 通通轉檔為 mp3。
Recently, I needed to convert M4A files into MP3 format, so I wrote a Python program to handle it. The idea is to place multiple M4A files into an input folder, then simply double-click the program to automatically convert all the M4A files into MP3 files.
最近針對書本的目錄,需要創建相對應的資料夾。過去要找到該書的目錄網頁,一行一行地複製網頁文字,再一行一行地創建資料夾、重新命名、貼上。或是直接依據該書的紙本目錄,一行一行地看,創建資料夾、重新命名、一行一行地打字。
Recently, I often need to create corresponding folders based on a book’s table of contents. In the past, I had to find the webpage containing the book’s contents, copy the text line by line, and then create folders one by one, rename them, and paste the titles manually. Another method was to look at the printed table of contents and type each line manually while creating and renaming folders one at a time.
總覺得速度很慢,希望能夠將目錄網頁內容複製(或打入)到一個文字檔,程式依據該文字檔內容,一行一行地創建對應的資料夾。
I always felt this process was too slow. I hope to be able to copy the contents from a webpage (or type them in) into a text file, and then have a program automatically create the corresponding folders line by line according to the contents of that text file.
系列文章:
01.python 不管何時何地,只要點兩下,資料夾內的所有pdf都會合併成一個pdf
https://skjhcreator.blogspot.com/2022/06/pythonpdfpdf.html
02.python 只要點兩下,分別對各資料夾內的pdf合併,合併後的檔名要讓人知道來自哪個資料夾
https://skjhcreator.blogspot.com/2022/06/python-pdf.html
03. 只要點兩下,就能將一堆的Doc與Docx 轉成 PDF
03.https://skjhcreator.blogspot.com/2023/05/docdocx-pdf.html
04.只要點兩下,就能將一堆的JPG轉成一個PDF,並以JPG所在的資料夾名稱為PDF的檔名
04.https://skjhcreator.blogspot.com/2023/06/jpgpdfjpgpdf.html
05.只要點兩下,就能將放進input的一堆PDF轉成各自的WORD
05.https://skjhcreator.blogspot.com/2023/10/inputpdfword.html
06.只要點兩下,就能將放進input的一堆PDF轉成在ouput資料夾內的各自的WORD
06.https://skjhcreator.blogspot.com/2023/10/inputpdfouputword.html
07.只要點兩下,就能夠將InputAndOutput資料夾底下的子子孫孫資料夾內所有Word通通轉成PDF
07.https://skjhcreator.blogspot.com/2024/09/word-word-pdf.html
08.只要點兩下,就可以將資料夾input內的所有Word通通轉成一個PDF
08.https://skjhcreator.blogspot.com/2025/07/inputwordpdf.html
09.只要點兩下兩次,就能依照設定拆分指定PDF頁數並合併成設定好的一個PDF
09.https://skjhcreator.blogspot.com/2025/09/pdfpdf.html
10.只要點兩下,就能將input資料夾內所有PDF進行容量壓縮-版本01
10.https://skjhcreator.blogspot.com/2026/04/inputpdf.html
Just double-click to compress all PDFs in the input folder.
最近要上傳一大堆的PDF,常常因為PDF內的照片未經壓縮,導致整體容量過大。上傳時又因容量過大,導致無法上傳。上傳網站要求多少容量內的PDF才能上傳。問題是PDF不是我做的,偏偏又要發回或通知原主,要做PDF壓縮,才能上傳。如此的一來一往,浪費很多時間。能不能有個程式,讓我點個兩下就能將這些PDF進行壓縮,而不用再跟原主溝通?
Recently, I’ve had to upload a large number of PDFs, but they’re often too big because the images inside them haven’t been compressed. As a result, the files exceed the upload size limit and can’t be uploaded. The website requires PDFs to be under a certain size, but the problem is that I didn’t create these PDFs. I end up having to send them back or notify the original creator to compress them before I can upload them. This back-and-forth wastes a lot of time.
Is there a program that would let me simply double-click and compress these PDFs myself, without needing to communicate with the original creator?
方法:Python + Ghostscript
一、下載與安裝 Ghostscript
到 https://www.ghostscript.com/download/gsdnld.html 下載後,點兩下進行安裝
系列文章:
1.Ubuntu 24.04 安裝 chcweb 專案的過程記錄
2.Ubuntu 24.04 安裝 laravel 5.7 的過程記錄
3.laravel 5.7 初始相關設定與注意事項
4.想修改 chcweb 出現的問題解決集
解決方法:
錯誤意思是 Laravel 沒辦法寫入 log 檔,通常跟 目錄權限 有關。
Laravel 日誌檔案路徑:
/home/webadmin/html/chcweb/storage/logs/laravel-2026-04-16.log
需要 Web 伺服器用戶能夠寫入。通常 Linux 系統 Web 伺服器用戶是:
www-data
apache 或 nginx
檢查目錄權限:
ls -l /home/webadmin/html/chcweb/storage/logs/2.設定正確的擁有者
假設你的 Web 伺服器用戶是
www-data:小技巧:sudo chown -R www-data:www-data /home/webadmin/html/chcweb/storage這樣 Web 伺服器就能寫入。3.設定正確的權限
Laravel 需要storage和bootstrap/cache可寫:sudo chmod -R 775 /home/webadmin/html/chcweb/storage
sudo chmod -R 775 /home/webadmin/html/chcweb/bootstrap/cache
775:擁有者與群組可讀寫執行,其他人可讀與執行- 如果 775 仍然不行,可以暫時用 777 測試,但不建議長期使用(安全性較低)
4.清除快取(可選)
Laravel 有時會快取檔案路徑,建議清除:
php artisan config:clear
php artisan cache:clear然後再重新載入網站看看是否正常。
Laravel 的storage和bootstrap/cache目錄必須可寫,這是最常見的「Permission denied」原因。
一行命令,直接安全地修復 Laravel 所有目錄的權限和擁有者,幾乎可以立即解決這種錯誤:
sudo chown -R www-data:www-data /home/webadmin/html/chcweb && sudo find /home/webadmin/html/chcweb/storage -type d -exec chmod 775 {} \; && sudo find /home/webadmin/html/chcweb/storage -type f -exec chmod 664 {} \; && sudo find /home/webadmin/html/chcweb/bootstrap/cache -type d -exec chmod 775 {} \; && sudo find /home/webadmin/html/chcweb/bootstrap/cache -type f -exec chmod 664 {} \;
bg_image
1.建立 Migration
storage 與 bootstrap/cache 的權限。Laravel 需要以下目錄可讀寫:
storage
storage/logs
storage/framework
bootstrap/cache假設你的專案目錄是 /home/webadmin/html/chcweb:
cd /home/webadmin/html/chcweb
# 設定 owner 為 web server 使用者,通常是 www-data (Ubuntu/Debian) 或 apache/nginx
sudo chown -R webadmin:www-data storage bootstrap/cache
# 設定目錄可寫權限
sudo chmod -R 775 storage bootstrap/cache
#注意:如果你的 web server 使用者不是www-data,請改成實際使用者。3.Laravel 快速清理快取(建議做)
php artisan config:clear
php artisan cache:clear
php artisan route:clear
php artisan view:clear4. 測試
重新執行 migration:
php artisan migrate如果權限設定正確,就不會再出現
Permission denied。💡小技巧:
在開發環境中,設定storage和bootstrap/cache777(所有人可寫)雖然方便,但生產環境建議限制為 775 或更安全的方式,以免安全風險。
storage 與 bootstrap/cache 可以被 web server 寫入,同時保持相對安全(775)這個錯誤訊息告訴我們 Laravel 無法寫入 migration 檔案,因為目標目錄不存在或沒有權限。重點在這兩件事:
database/migrations 是否存在
執行:
ls -ld /home/webadmin/html/chcweb/database/migrations
No such file or directory,表示這個目錄真的不存在,需要建立:
Laravel 需要該目錄可寫入:
sudo chown -R webadmin:www-data /home/webadmin/html/chcweb/database/migrations
sudo chmod -R 775 /home/webadmin/html/chcweb/database/migrations
替換
webadmin和www-data為你的實際使用者與 web server 群組。
php artisan make:migration add_bg_image_to_setups_table --table=setups
這次 Laravel 就能成功在 database/migrations 產生檔案了。
💡 小提醒:
storage、bootstrap/cache、database/migrations 都需要對 Laravel 可寫。
4. 一次性指令:
把 Laravel 專案的 storage、bootstrap/cache、database/migrations 全部權限一次調整好。
sudo mkdir -p /home/webadmin/html/chcweb/database/migrations && sudo chown -R webadmin:www-data /home/webadmin/html/chcweb/storage /home/webadmin/html/chcweb/bootstrap/cache /home/webadmin/html/chcweb/database/migrations && sudo chmod -R 775 /home/webadmin/html/chcweb/storage /home/webadmin/html/chcweb/bootstrap/cache /home/webadmin/html/chcweb/database/migrations
彰化縣學校資通安全稽核網站: https://audit.mychc.site/ 彰化縣學校資通安全稽核網站管理登入: https://audit.mychc.site/admin/ 登入之後的設定: 1.稽核設定->年度稽核學校->新增學校 完成之後,就可以有四個選...