martedì 10 gennaio 2023

Linux permission with WINSCP

 I find frustrating the way linux manage permissions and how to grant a folder permissions to upload file with winscp.


Now the best way I find to do that is:

1. create a group for a project folder and add users to it (this is not mandatory but a good way to work)

$ groupadd <group>

$ usermod -a -G <user> <group>

2. assign permission to folder to grant upload to ftp/winscp:

$ chmod o+rwx -R workfolder/  #This assign "others" rights to rwx, could be harmful in case of web application, be carefull!

$ chmod g+rwx -R workfolder/ #grant write to group

 

venerdì 26 agosto 2022

New goal

 I know is just a small step but to me looks like a goal.

First container running and working.



venerdì 19 agosto 2022

Grep Recursive

 Command to recursively search into file with grep:

grep --include="*.prop*" -nRHI "<text>" * > filename.txt


martedì 15 marzo 2022

Change ngnix area pwd

How to change a password for user on a secured area proxied by ngnix:

sudo htpasswd /etc/nginx/.htpasswd

giovedì 8 luglio 2021

Pensione

 Nell'azienda dove lavor ci sono diverse persone in Pensione che lavorano ancora come consulenti.

La cosa non sarebbe grave se non si lamentassero per ogni cosa e se non pretendessero dall'azienda gli stessi servizi di quando erano dipendenti.


Gli abbiamo proposto di fare cambio: lui al lavoro e noi a casa con la sua pensione ma stranamente dicono no, è meglio la pensione...... Ma allora vai a casa lascia il posto a qualcuno !


mercoledì 7 aprile 2021

EC2 Enable awslogsd

 list enabled service :

systemctl list-unit-files


enable awslogsd:

sudo systemctl enable awslogsd

mercoledì 24 marzo 2021

Set date time in Centos

 Install ntp client


yum install ntpdate

modify /etc/ntp/step-tickers adding all the ntp server needed


ntpdate <ip_ntp_server>   -> ntpdate 0.it.pool.ntp.org

systemctl restart ntpdate

systemctl enable ntpdate


check time with timedatctl


change timezone:

timedatectl list-timezones
sudo timedatectl set-timezone your_time_zone