Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

April 17, 2020

file/folder access rights



u+x - разрешить выполнение для владельца;
ugo+x - разрешить выполнение для всех;
ug+w - разрешить запись для владельца и группы;
o-x - запретить выполнение для остальных пользователей;
ugo+rwx - разрешить все для всех;






0 - никаких прав;
1 - только выполнение;
2 - только запись;
3 - выполнение и запись;
4 - только чтение;
5 - чтение и выполнение;
6 - чтение и запись;
7 - чтение запись и выполнение.





744 - разрешить все для владельца, а остальным только чтение;
755 - все для владельца, остальным только чтение и выполнение;
764 - все для владельца, чтение и запись для группы, и только чтение для остальных;
777 - всем разрешено все.

print where system is looking for executables - $PATH

echo $PATH

extract tr.gz file

tar -zxvf file_name.tar.gz

install rpm file on linux

sudo rpm –i sample_file.rpm

check which window manager is running

printf 'Desktop: %s\nSession: %s\n' "$XDG_CURRENT_DESKTOP" "$GDMSESSION"

January 23, 2016

ssh login without password via id_rsa

machine A - client
machine B - server

on A run
ssh-keygen -t rsa
if asked to provide password just press ENTER

Result:
ls ~/.ssh

you should see the id_rsa & id_rsa.pub files


login via ssh to B

ssh username@machine_ip
promt for password - type in your password

ls ~/.ssh

if directory does not exist - create it
mkdir ~/.ssh

if directory exists - log out

on A

let's copy the id_rsa.pub key to remote server B

cat .ssh/id_rsa.pub | ssh username@machine_b_ip  'cat >> .ssh/authorized_keys'
promt for password - type in your password


we are almost done. From now you can login to remote machine without password promt. But we need to take some security providing steps.

from A let's login to B

ssh username@machine_b_ip

No password promt. You have been loged in to remote server 2.
Please apply

chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

November 3, 2011

November 2, 2011

add new disk to the system

fdisk -l
\\output - list of /dev/xxx
cfisk /dev/xxx
\\new, write
mkfs -t ext3 /dev/xx

How to type letters with accent

Very useful article https://www.freecodecamp.org/news/how-to-type-letters-with-accents-on-mac/