Category Archives: Linux/Unix

ssh user for scp only, chrooted

controlled at OpenSSH_6.0p1, Debian-4+deb7u2 If I write commands with # – that is root permission required. Remember to use sudo instead of root console. 1. in /etc/ssh/sshd_config add Match group groupforscponly ChrootDirectory ~ X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp note … Continue reading

Posted in Administration, Linux/Unix | Leave a comment

debian 8.1 install ntfs-3g 1:2012 instead of 1:2014 and set it to no autoupdate

It’s happened, that 1:2014 version of ntfs-3g does not work correctly for me (drops input/output error when mounted, ls -alh for that mounted partition will show d????????? instead of correct permissions drwxr-xr-x for example) The way I solved this problem … Continue reading

Posted in Administration, Linux/Unix | Leave a comment

Debian 7 ( 7.8 ) remove unneeded translation and localization files (Estonian)

In case the lang is set, default programs try to translate interface to this language. Found a few tricks that could change it: apt to download en translations # sudo sh -c ‘echo ” Acquire::Languages \”en\”;” > /etc/apt/apt.conf.d/99translations’ delete already … Continue reading

Posted in Administration, Linux/Unix | Leave a comment

choosing default editor in Debian (7.7)

Always after new debian install I forget a command to configure default editor: update-alternatives –config editor Then choose default editor. If missing from list, install it first. My option “vim” is available by installed default.

Posted in Administration, Linux/Unix | Leave a comment

debian sysV scripts adding to startup and removing from startup

I always forget following command. Works on old sysV init type init system. To add service into startup on nginx example: # update-rc.d nginx defaults to remove service from startup: # update-rc.d -f nginx remove https://www.debian-administration.org/article/28/Making_scripts_run_at_boot_time_with_Debian

Posted in Administration, Linux/Unix | Leave a comment

mirroring under linux debian 6.0.7

Requested reliability. Need some way to boot system even with faulty drive. Raid1, with expansion ability is on target. Debian 6.0.7 installation cd supports installing system to software raid, so will use it. Tested: Debian 6.0.7 on 2x 500GB hdd. … Continue reading

Posted in Administration, Linux/Unix | 2 Comments

Aligned advanced format partition creation using gparted under debian 6.0.7

This applies when new uninitialized drive used. parted (parted) print Error: /dev/sdb: unrecognised disk label (parted) mklabel gpt (parted) unit S (parted) mkpart Name ext3 2048 100% (parted) align-check optimal 1 1 aligned Then format must be performed and partition … Continue reading

Posted in Administration, hardware, Linux/Unix | Leave a comment

mount image created with dd in linux

You’ve got the first part: 1) fdisk -l /path/to/image to find the start offset. Take that number, multiply by 512, and you’ll get the offset option to mount. So, for sda1 in your case, 5 * 512 = 2560. Then … Continue reading

Posted in Administration, Linux/Unix | Leave a comment

mounting in linux the way users had full access to it

Seems simple enough, however I decided to create note for that. For example, /etc/fstab has: /dev/disk/by-id/scsi-SATA_Hitachi_HUA7230_MK0371ZZZZZZZZZ-part1 /mnt/3tb ext3 user 0 0 So, any user can mount it. But you must permit for mounted system to have permission. Lets see listing: … Continue reading

Posted in Administration, Linux/Unix | Leave a comment

WordPress 2m upload limit

default wordpress limit is 2m. But this is not a wordpress limit. Changed on debian: $ cat /etc/php5/cgi/php.ini | grep post_max post_max_size = 8M In the server context: $ cat /etc/nginx/sites-enabled/default | grep max client_max_body_size 8M; restart: # sh /etc/init.d/php5-cgi … Continue reading

Posted in Administration, Linux/Unix | Tagged , | Leave a comment