Site Tools


tech_public:tp_linux (text)

This is an old revision of the document!


Linux

  

Linux Mint optimize

CHMOD all files/directories

find . -type f -exec chmod 660 -- {} +

find . -type d -exec chmod 2770 -- {} +

(-- to prevent name starting with dash as conflict)

Change SFTP default upload permission (umask)

  1. Ordered List ItemUpdated /etc/ssh/sshd_config with Subsystem sftp /usr/lib/openssh/sftp-server -u XXX
  2. sudo systemctl restart ssh

SSH key login as root

WINSCP allow sudo command with normal account

Mount SMB v3 from Windows

  • sudo apt install smbclient cifs-utils
  • mkdir /TARGETFOLDER
  • Create .credential file (“.” stand for hidden file), content: username=XXX password=XXX (separate line).
  • CHMOD .credential file to 600
  • sudo vi /etc/fstab
//XX.XX.XX.XX/SharedFolder /TARGETFOLDER cifs vers=3.0,credentials=.credential,uid=userid,gid=groupid,iocharset=utf8 0 0
  • sudo systemctl daemon-reload
  • Mount drive command: sudo mount /TARGETFOLDER
  • Force unmount drive command: sudo umount -l /TARGETFOLDER
tech_public/tp_linux.1740064155.txt.gz · Last modified: by jasonwch (text)

Top ↑